본문 바로가기

Develop

Local directories with Apache on Ubuntu 7.04

We all want to have local directories in Apache so we can write and test code safely. Here’s how to do it

1. Create a directory in your home called public_html

2. Install the userdir Apache module using the a2enmod command like so

sudo a2enmod userdir

3. Edit the Apache 2 user preferences configuration file at /etc/apache2/httpd.conf

sudo vi /etc/apache2/httpd.conf

4. Put the following in the config file

<IfModule mod_userdir.c>
UserDir public_html
</IfModule>

5. Now restart Apache like so

sudo /etc/init.d/apache2 force-reload

6. You should now be able to browse your public_html directory from a web browser at the following URL:

http://localhost/~<username>/


http://dollarunderscore.wordpress.com/2007/05/19/local-directories-with-apache-on-ubuntu-704/

반응형

'Develop' 카테고리의 다른 글

.htaccess 설정파일.  (0) 2008.01.27
CVS 설정하기  (0) 2008.01.05
Ubuntu LAMP Server Guide - Configure Apache, mySQL, and cgi-bin  (0) 2007.12.20
How To Install Eclipse 3.3 Manually  (0) 2007.12.19
Set java path  (0) 2007.12.17