hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Software and Control Panels : Apache virtual hosting not working
Reply

Forum Jump

Apache virtual hosting not working

Reply Post New Thread In Hosting Software and Control Panels Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-11-2012, 09:46 AM
kkruecke kkruecke is offline
Junior 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
I edited kurttest and krueckeberg to look like what is shown below
Code:
# sudo a2dissite default
# sudo a2ensite krueckeberg
# sudo a2ensite kurttest
# sudo /etc/init.d/apache2 restart
kurttest has
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>
krueckeberg has
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>
kurttest.com is returning the content for krueckeberg.org?

Reply With Quote


Sponsored Links
  #2  
Old 04-11-2012, 09:59 AM
kkruecke kkruecke is offline
Junior Guru Wannabe
 
Join Date: Apr 2012
Posts: 33
I forgot ServerName and ServerAlias in each site file. It is now working.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache + Virtual Hosting danmcl Hosting Security and Technology 0 10-20-2005 12:04 PM
need working apache + suexec + frontpage working patch ssrsunil Web Hosting 4 09-10-2005 04:23 PM
virtual hosting on apache - two weeks later still not working kckclass Hosting Security and Technology 22 03-18-2004 01:58 AM
retard webmaster's virtual hosting on apache - three weeks later still not working kckclass Hosting Security and Technology 2 01-25-2004 04:58 AM
Apache 1.3.29 with Virtual Hosting - SSI not working VisiGod Hosting Security and Technology 7 01-19-2004 02:24 PM

Related posts from TheWhir.com
Title Type Date Posted
Apache Market Share Falls in Netcraft October Web Server Survey Web Hosting News 2013-10-04 14:34:11
LeaseWeb Doubles Resources of Cloud, Virtual Server Plans Web Hosting News 2013-06-04 11:20:42
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
CloudStack 4.0 Open Source Cloud Software Released as Apache Incubator Project Web Hosting News 2012-11-08 13:54:10
Google Launches Open Source Apache HTTP Server Module mod_pagespeed Web Hosting News 2012-10-12 12:01:56


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?