Hi all, first time poster, but please help. I have been searching and reconfiguring for 6 days now and have lost several clumps of hair..
PROBLEM:
I want 2+ virtual hosts on my ubuntu server (1 ip)
BUT - Only the first "alphabetically" listed sites-enabled shows.
000-default
www.domain1.com
www.domain2.com
Individually they all work (if i a2dissite for each leaving 1)
CONFIG:
UBUNTU 10.10 Server
EC2 instance (dont shoot me for this part - hoping this isnt the issue!)
APACHE 2.2.16
DNS my.domain.com
- to my public ec2 dns (this works)
Virtual Hosts:
# default
Code:
<VirtualHost *:80>
DocumentRoot "/home/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>
<Directory /home/www>
Options Indexes Multiviews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
LogLevel debug
ErrorLog /home/www/logs/error.log
CustomLog /home/www/logs/access.log "combined"
</VirtualHost>
Virtual Host 1 - domain1
Code:
<VirtualHost *:80>
ServerAdmin webmaster@domain1.com
ServerName domain1.com
ServerAlias domain1.com
ServerAlias www.domain1.com
# Indexes + Directory Root.
DirectoryIndex index.php
DocumentRoot "/home/www/www.domain1.com/"
# Directory directive
<Directory "/home/www/www.domain1.com">
Options Indexes Multiviews FollowSymLinks
AllowOverride none
Order allow,deny
Allow from all
</Directory>
# CGI Directory
ScriptAlias /cgi-bin/ /home/www/www.domain1.com/cgi-bin
<Location /cgi-bin>
Options +ExecCGI
</Location>
# Logfiles
LogLevel debug
ErrorLog "/home/www/www.domain1.com/logs/error.log"
CustomLog "/home/www/www.domain1.com/logs/access.log" combined
</VirtualHost>
I also have the above for domain2 in another document root with a different domain name
sym links are in place:
my apache2ctl -St shows the following -
VirtualHost configuration:
*:80 is a NameVirtualHost
default server (/etc/apache2/sites-enabled/000-default:4)
port 80 namevhost (/etc/apache2/sites-enabled/000-default:4)
port 80 namevhost domain1.com (/etc/apache2/sites-enabled/www.domain1.com:4)
port 80 namevhost
www.domain2.com (/etc/apache2/sites-enabled/www.domain2.com:4)
Syntax OK
My ports.conf:
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
NameVirtualHost *.443
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
No changes from default to my apache2.conf and httpd.conf is empty.
I have tried the following (and about a hundred others):
http://httpd.apache.org/docs/2.2/rewrite/vhosts.html
http://ubuntuforums.org/archive/inde...t-1466665.html
http://flurdy.com/docs/ec2/basics/index.html
http://www.webmasterworld.com/apache/3282118.htm
it seems i have tried everything that everyone else is having issues with but nothing seems to fix mine.
Possibilities:
1) EC2
2) Permissions on the files - I changed everything to the apache2 user "www-data" - no dice.
3) I am a dope...lets hope its that and one of you kind people point me to my issue.
Chat soon...ill be over here losing my hair.
Regards, Logansanoh