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 m...@mondomaine.org
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-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to