View Full Version : [ubuntu] [SOLVED] Apache Root Server

September 24th, 2008, 09:23 PM
Hi a few months ago I was setting up a LAMP server and I had problems saving to the default root var/www then after days of searching I found some instructions on the web on how to change the server in apache's config but today with the help of this forum I have managed to change the ownership rights to var/www. But now I can remember how to change my root server back to the default and despite searching most of the day I can't find the web site I used to change the settings. Does anyone know what it is I type into the terminal to change it back.



September 24th, 2008, 11:19 PM
The configuraion files for running servers under apache is in /etc/apache2/sites-enabled so if you look at that configuration file you will see where you point to which directory you want to host your website files.

this is what the default looks like

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from ::1/128


just modiligrify your DocumentRoot and Directory in the configuration file and then restart the apache2 daemon and you should be good to go.

If you need a more step-by-step answer then we will try to break it down even more for you.