httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <rob...@profundis.nu>
Subject Re: Problem of Virtual host
Date Mon, 05 Aug 2002 06:36:27 GMT
Me guess here; you have duplicated hosts for the normal (port 80) host and
the SSL (443) for them to be accessed with or without "www." in front,
right? If so, spare yourself, and do like this:

<VirtualHost 192.168.200.1>
    ...
    ServerName domain1.com
    ServerAlias www.domain1.com
    ...
</VirtualHost>

<IfDefine SSL>
<VirtualHost 192.168.200.1:443>
    ...
    ServerName domain2.com
    ServerAlias www.domain2.com
    ...
</VirtualHost>
</IfDefine>

You also notice to add the port after the IP address on the SSL host.

Regards,
Robert Andersson

----- Original Message -----
From: <EdwardSPL@ita.org.mo>
To: <users@httpd.apache.org>
Sent: Sunday, August 04, 2002 7:40 PM
Subject: Problem of Virtual host


> Hello,
>
> This my setting of virtual-host :
>
> <VirtualHost 192.168.200.1>
> DocumentRoot "/home/domain1/html"
> ServerName domain1.com
> ServerAdmin root@@domain1.com
> <Directory "/home/domain1/html">
>  Options Indexes Includes FollowSymLinks MultiViews ExecCGI
>  AllowOverride All
>  Order allow,deny
>  Allow from all
> </Directory>
> ErrorLog /var/log/httpd/domian1-error.log
> CustomLog /var/log/httpd/domain1-access.log common
> </VirtualHost>
>
> <VirtualHost 192.168.200.1>
> DocumentRoot "/home/domain1/html"
> ServerName www.domain1.com
> ServerAdmin root@domain1.com
> <Directory "/home/domain1/html">
>  Options Indexes Includes FollowSymLinks MultiViews ExecCGI
>  AllowOverride All
>  Order allow,deny
>  Allow from all
> </Directory>
> ErrorLog /var/log/httpd/domian1-error.log
> CustomLog /var/log/httpd/domain1-access.log common
> </VirtualHost>
>
> # SSL :
>
> <IfDefine SSL>
> <VirtualHost 192.168.200.1>
> DocumentRoot "/home/domain2/html"
> ServerName domain2.com
> ServerAdmin root@domain2.com
> <Directory "/home/domain2/html">
>  Options Indexes Includes FollowSymLinks MultiViews ExecCGI
>  AllowOverride All
>  Order allow,deny
>  Allow from all
> </Directory>
> ErrorLog /var/log/httpd/domian2-error.log
> CustomLog /var/log/httpd/domain2-access.log common
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
> SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
> <Files ~ "\.(cgi|shtml|phtml|php3?)$">
>     SSLOptions +StdEnvVars
> </Files>
> <Directory "/usr/local/apache/cgi-bin">
>     SSLOptions +StdEnvVars
> </Directory>
> SetEnvIf User-Agent ".*MSIE.*" \
>          nokeepalive ssl-unclean-shutdown \
>          downgrade-1.0 force-response-1.0
> CustomLog /usr/local/apache/logs/upp-ssl.log \
>           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> </VirtualHost>
> </IfDefine>
>
> <IfDefine SSL>
> <VirtualHost 192.168.200.1>
> DocumentRoot "/home/domain2/html"
> ServerName www.domain2.com
> ServerAdmin root@domain2.com
> <Directory "/home/domain2/html">
>  Options Indexes Includes FollowSymLinks MultiViews ExecCGI
>  AllowOverride All
>  Order allow,deny
>  Allow from all
> </Directory>
> ErrorLog /var/log/httpd/domian2-error.log
> CustomLog /var/log/httpd/domain2-access.log common
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
> SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
> <Files ~ "\.(cgi|shtml|phtml|php3?)$">
>     SSLOptions +StdEnvVars
> </Files>
> <Directory "/usr/local/apache/cgi-bin">
>     SSLOptions +StdEnvVars
> </Directory>
> SetEnvIf User-Agent ".*MSIE.*" \
>          nokeepalive ssl-unclean-shutdown \
>          downgrade-1.0 force-response-1.0
> CustomLog /usr/local/apache/logs/upp-ssl.log \
>           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> </VirtualHost>
>
> error_log file :
>
> [Mon Aug  5 01:28:01 2002] [warn] VirtualHost 192.168.200.1:80 overlaps
> with VirtualHost 192.168.200.1:80, the first has precedence, perhaps you
> need a NameVirtualHost directive
> [Mon Aug  5 01:28:01 2002] [warn] VirtualHost 192.168.200.1:80 overlaps
> with VirtualHost 192.168.200.1:80, the first has precedence, perhaps you
> need a NameVirtualHost directive
> [Mon Aug  5 01:28:01 2002] [warn] VirtualHost 192.168.200.1:80 overlaps
> with VirtualHost 192.168.200.1:80, the first has precedence, perhaps you
> need a NameVirtualHost directive
> [Mon Aug  5 01:28:01 2002] [crit] (98)Address already in use: make_sock:
> could not bind to port 80
>
> So, can you help me ?
>
> Thanks,
>
> Edward.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message