I was going to delete this question, but I couldn't because it has been answered. I am abandoning this question because I am going to replace my desktop install with a server install. We'll see if that fixes it.
I installed LAMP with apache2 on my Ubuntu 10.04 system. It works and serves files from /var/www. I followed the instruction found [here]. The new site username is selah and the domain name is selahsanctuary.org.
Here's my file, /etc/apache2/sites-enabled/selah
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName selahsanctuary.org DocumentRoot /home/selah/public_html/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/selah/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> 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 Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
I verified that /home/selah/public_html/index.html exists.
If I visit http://selahsanctuary.com, I get the file served from /var/www. I found a suggestion that I add /etc/apache2/conf.d/virtual.conf with this line:
NameVirtualHost * but that caused an error so I removed it. Then I found a suggestion to add a line in /etc/host like
127.0.0.1 selahsanctuary.org. I did and restarted apache2. No help. So finally, I ask, what should I try next? Do I have a typo somewhere?
I tried to simplify and found another sample of a site-available file like this:
<VirtualHost selahsanctuary.org> ServerAdmin webmaster@localhost #We want to be able to access the web site using www.selahsanctuary.org or selahsanctuary.org ServerAlias www.selahsanctuary.org DocumentRoot /home/selah/public_html #we want specific log file for this server CustomLog /home/selah/selah-access.log combined </VirtualHost>
and I edited my /etc/hosts file so there is now a line like this:
127.0.0.1 localhost www.selahsanctuary.org selahsanctuary.org but it still serves the file from /var/www (I did remember to a2ensite selah and /etc/init.d/apache2 reload)