Two _default_, one for port 80 and another for port 443

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is it possible to have two _defaut_ sections in apache2.conf, one for
http and another for https ?
I've tried something like this :

ServerAdmin moi@xxxxxxxxxxxxxx
ServerName www.mondomaine.org
<Directory />
	Options FollowSymLinks
	AllowOverride AuthConfig
</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
<VirtualHost _default_:80>
	ServerName www.mondomaine.org
	DocumentRoot /www/www.mondomaine.org
</VirtualHost>
<VirtualHost *:80>
	ServerName site1.mondomaine.org
	DocumentRoot /www/site1.mondomaine.org
</VirtualHost>
<VirtualHost *:80>
	ServerName site2.mondomaine.org
	DocumentRoot /www/site2.mondomaine.org
</VirtualHost>
<VirtualHost *:80>
	ServerName sitehttps.mondomaine.org
	RewriteEngine On
	RewriteCond %{SERVER_PORT} 80
	RewriteRule ^/(.*)$ https://%{SERVER_NAME}%{REQUEST_URI}
[R=301,L]
</VirtualHost>
<VirtualHost *:443>
	ServerName sitehttps.mondomaine.org
	DocumentRoot /www/sitehttps.mondomaine.org
	[...]
</VirtualHost>

Everything is ok !!!
But, if I add :
<VirtualHost _default_:443>
	DocumentRoot /www/site2https.mondomaine.org
	[...]
</VirtualHost>

I have this error :
Restarting web server: apache2[Tue Dec 23 15:59:49 2008] [warn]
_default_ VirtualHost overlap on port 443, the first has precedence ...
waiting [Tue Dec 23 15:59:50 2008] [warn] _default_ VirtualHost overlap
on port 443, the first has precedence

Do you have any idea ?

Thanks.

David.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux