Hi, this is my first post, hope you have patience about my novice skills :P
I try to configure my apache2 server (ubuntu) using NameVirtualHost. At this moment i have 3 domains pointing at my static ip; domain1.dyndns.org, domain2.com, domain3.com
My wish is that domain2.com and domain3.com will be configured as Virtualhost pointing to their special directory. All other HTTP-requests like accessing my router (domain1.dyndns.org:8080) remote will be pointed to the domain1.dyndns.org and accessed from there.
For now i have a issue from the apache-server when restarting and i cant see the problem, notice i dont have the default file enabled, only domain2.com and domain3.com, if i enable default the other domains points to my www directory, i still dont understand the problem:
/etc/init.d/apache2 restart * Restarting web server apache2 [Wed Jul 06 13:16:24 2011] [warn] _default_ VirtualHost overlap on port 80, the first has precedence ... waiting [Wed Jul 06 13:16:26 2011] [warn] _default_ VirtualHost overlap on port 80, the first has precedence This is my configuration right now:
ports.conf:
Listen 80 Listen 443 /Sites-available/default:
<VirtualHost _default_:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> 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> </VirtualHost> /Sites-available/domain2.com:
<VirtualHost *:80> ServerName domain2.com ServerAlias www.domain2.com ServerAdmin [email protected] DocumentRoot /var/www/domain2.com/ <Directory /var/www/domain2.com/> Order Deny,Allow Allow from all # Don't show indexes for directories Options -Indexes </Directory> </VirtualHost> /Sites-available/domain3.com:
<VirtualHost *:80> ServerName domain3.com ServerAlias www.domain3.com ServerAdmin [email protected] DocumentRoot /var/www/domain3.com/ <Directory /var/www/domain3.com/> Order Deny,Allow Allow from all # Don't show indexes for directories Options -Indexes </Directory> </VirtualHost>