Results 1 to 2 of 2
-
04-11-2012, 09:46 AM #1Junior Guru Wannabe
- Join Date
- Apr 2012
- Posts
- 33
Apache virtual hosting not working
I have VPS running Ubuntu. I installed apache2 and php5.
I have two websites I want to run. However, the content for the first site is displaying for both sites. Here is what I did:
Code:# sudo aptitude install apache2 php5 # sudo cd /etc/apache2/sites-available/ # sudo cp default kurttest # sudo cp default krueckeberg
Code:# sudo a2dissite default # sudo a2ensite krueckeberg # sudo a2ensite kurttest # sudo /etc/init.d/apache2 restart
Code:<VirtualHost *:80> DocumentRoot "/var/www/kurttest.com" # I'm not sure what this <Directory /> is for? <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/var/www/kurttest.com/"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/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>
Code:<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/krueckeberg.org <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/krueckeberg.org> 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 ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/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>
-
04-11-2012, 09:59 AM #2Junior Guru Wannabe
- Join Date
- Apr 2012
- Posts
- 33
I forgot ServerName and ServerAlias in each site file. It is now working.
Similar Threads
-
Apache + Virtual Hosting
By danmcl in forum Hosting Security and TechnologyReplies: 0Last Post: 10-20-2005, 12:04 PM -
need working apache + suexec + frontpage working patch
By ssrsunil in forum Web HostingReplies: 4Last Post: 09-10-2005, 04:23 PM -
virtual hosting on apache - two weeks later still not working
By kckclass in forum Hosting Security and TechnologyReplies: 22Last Post: 03-18-2004, 01:58 AM -
retard webmaster's virtual hosting on apache - three weeks later still not working
By kckclass in forum Hosting Security and TechnologyReplies: 2Last Post: 01-25-2004, 04:58 AM -
Apache 1.3.29 with Virtual Hosting - SSI not working
By VisiGod in forum Hosting Security and TechnologyReplies: 7Last Post: 01-19-2004, 02:24 PM