You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ed...@ita.org.mo on 2002/08/04 19:40:58 UTC

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


Max clients

Posted by Pritpal Dhaliwal <pd...@tycoint.com>.
what flag do u use to set number of max clients during compile time?


Paul

Re: Problem of Virtual host

Posted by "Jose Eduardo M. Neves" <ed...@netcabo.pt>.
Hello,

you really need a NameVirtualHost Directive ... before your VirtualHost 
configuration put this

Section 3: Virtual Hosts

<VirtualHost 192.168.xxx.xxx>
    DocumentRoot "xxxxxxxx"
    ServerName 195.168.xxx.xxx
    ServerAdmin xxxxx@xxxxxxxxx
    ErrorLog logs/error.log
</VirtualHost>
   
NameVirtualHost 192.168.xxx.xxx

Section 1: Global Environment you must specify what port is Apache 
listening ... default is 80
Section 2: 'Main' server configuration, you must specify ServerName 
195.168.xxx.xxx

I hope this can help you
Jose Eduardo Neves


EdwardSPL@ita.org.mo wrote:

>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


Re: Problem of Virtual host

Posted by Robert Andersson <ro...@profundis.nu>.
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: <Ed...@ita.org.mo>
To: <us...@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


Re: Problem of Virtual host

Posted by "J. Greenlees" <ja...@shaw.ca>.
as long as no firewall closing the extra ports and you add the ports to 
the https.conf that would work.
specifying the ports you have to make sure you add them to all relevant 
configuration files or you will not get anywhere.

kaushik kanni wrote:
> Hi Edward,
> This might be a hit and miss case but never the less
> my thoughts go something like this.
> 
> I believe we can configure based on Hostname,IP,and
> Port number. So How about trying to configure based on
> Port number.
> That is, for each of your 4 different virtual host tag
> along with the IP number pass 4 different Port
> Numbers.
> (I am assuming that for non SSL u passed 80 and for
> SSL it was 443).
> This is again just a suggestion as i have never tried
> the configuration of this nature.
> All the very best.
> 
> So as in 
> 
> 
> --- EdwardSPL@ita.org.mo wrote:
> 
>>Hello,
>>
>>I have just modify the setting ( your suggestion ) :
>>But restart the web server :
>>The result :
>>
>>[Mon Aug  5 11:45:39 2002] [warn] VirtualHost
>>192.168.200.1:443 overlaps
>>with VirtualHost 192.168.200.1:443, the first has
>>precedence, perhaps you
>>need a NameVirtualHost directive
>>[Mon Aug  5 11:45:39 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
>>
>>BTW, I have just visited the FAQ of modssl also :
>>http://www.modssl.org/docs/2.8/ssl_faq.html#vhosts
>>
>>Why can't I use SSL with name-based/non-IP-based
>>virtual hosts?
>>The reason is very technical. Actually it's some
>>sort of a chicken and
>>egg problem: The SSL protocol layer stays below the
>>HTTP protocol layer
>>and encapsulates HTTP. When an SSL connection
>>(HTTPS) is established
>>Apache/mod_ssl has to negotiate the SSL protocol
>>parameters with the
>>client. For this mod_ssl has to consult the
>>configuration of the virtual
>>server (for instance it has to look for the cipher
>>suite, the server
>>certificate, etc.). But in order to dispatch to the
>>correct virtual
>>server Apache has to know the Host HTTP header
>>field. For this the HTTP
>>request header has to be read. This cannot be done
>>before the SSL
>>handshake is finished. But the information is
>>already needed at the SSL
>>handshake phase. Bingo!
>>
>>We can't use SSL with virtual hosts ( name-based /
>>IP-based ) ?
>>
>>So, can you help me more ?
>>
>>Thanks,
>>
>>kaushik kanni wrote:
>>
>>
>>>Hi, please note my suggestion
>>>You have to mention the port number along when u
>>>mention the IP for the virtual host
>>>Ex: <VirtualHost 192.168.200.1>
>>>Should be set as <VirtualHost 192.168.200.1:80>
>>>and for SSL
>>><VirtualHost 192.168.200.1:443>
>>>
>>>Best reagards
>>>
>>>--- EdwardSPL@ita.org.mo wrote:
>>>
>>>>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
>>>>
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> 
> ---------------------------------------------------------------------
> 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


Re: Problem of Virtual host

Posted by kaushik kanni <ro...@yahoo.com>.
Hi Edward,
This might be a hit and miss case but never the less
my thoughts go something like this.

I believe we can configure based on Hostname,IP,and
Port number. So How about trying to configure based on
Port number.
That is, for each of your 4 different virtual host tag
along with the IP number pass 4 different Port
Numbers.
(I am assuming that for non SSL u passed 80 and for
SSL it was 443).
This is again just a suggestion as i have never tried
the configuration of this nature.
All the very best.

So as in 


--- EdwardSPL@ita.org.mo wrote:
> Hello,
> 
> I have just modify the setting ( your suggestion ) :
> But restart the web server :
> The result :
> 
> [Mon Aug  5 11:45:39 2002] [warn] VirtualHost
> 192.168.200.1:443 overlaps
> with VirtualHost 192.168.200.1:443, the first has
> precedence, perhaps you
> need a NameVirtualHost directive
> [Mon Aug  5 11:45:39 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
> 
> BTW, I have just visited the FAQ of modssl also :
> http://www.modssl.org/docs/2.8/ssl_faq.html#vhosts
> 
> Why can't I use SSL with name-based/non-IP-based
> virtual hosts?
> The reason is very technical. Actually it's some
> sort of a chicken and
> egg problem: The SSL protocol layer stays below the
> HTTP protocol layer
> and encapsulates HTTP. When an SSL connection
> (HTTPS) is established
> Apache/mod_ssl has to negotiate the SSL protocol
> parameters with the
> client. For this mod_ssl has to consult the
> configuration of the virtual
> server (for instance it has to look for the cipher
> suite, the server
> certificate, etc.). But in order to dispatch to the
> correct virtual
> server Apache has to know the Host HTTP header
> field. For this the HTTP
> request header has to be read. This cannot be done
> before the SSL
> handshake is finished. But the information is
> already needed at the SSL
> handshake phase. Bingo!
> 
> We can't use SSL with virtual hosts ( name-based /
> IP-based ) ?
> 
> So, can you help me more ?
> 
> Thanks,
> 
> kaushik kanni wrote:
> 
> > Hi, please note my suggestion
> > You have to mention the port number along when u
> > mention the IP for the virtual host
> > Ex: <VirtualHost 192.168.200.1>
> > Should be set as <VirtualHost 192.168.200.1:80>
> > and for SSL
> > <VirtualHost 192.168.200.1:443>
> >
> > Best reagards
> >
> > --- EdwardSPL@ita.org.mo wrote:
> > > 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
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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


Re: Problem of Virtual host

Posted by Ed...@ita.org.mo.
Hello,

I have just modify the setting ( your suggestion ) :
But restart the web server :
The result :

[Mon Aug  5 11:45:39 2002] [warn] VirtualHost 192.168.200.1:443 overlaps
with VirtualHost 192.168.200.1:443, the first has precedence, perhaps you
need a NameVirtualHost directive
[Mon Aug  5 11:45:39 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

BTW, I have just visited the FAQ of modssl also :
http://www.modssl.org/docs/2.8/ssl_faq.html#vhosts

Why can't I use SSL with name-based/non-IP-based virtual hosts?
The reason is very technical. Actually it's some sort of a chicken and
egg problem: The SSL protocol layer stays below the HTTP protocol layer
and encapsulates HTTP. When an SSL connection (HTTPS) is established
Apache/mod_ssl has to negotiate the SSL protocol parameters with the
client. For this mod_ssl has to consult the configuration of the virtual
server (for instance it has to look for the cipher suite, the server
certificate, etc.). But in order to dispatch to the correct virtual
server Apache has to know the Host HTTP header field. For this the HTTP
request header has to be read. This cannot be done before the SSL
handshake is finished. But the information is already needed at the SSL
handshake phase. Bingo!

We can't use SSL with virtual hosts ( name-based / IP-based ) ?

So, can you help me more ?

Thanks,

kaushik kanni wrote:

> Hi, please note my suggestion
> You have to mention the port number along when u
> mention the IP for the virtual host
> Ex: <VirtualHost 192.168.200.1>
> Should be set as <VirtualHost 192.168.200.1:80>
> and for SSL
> <VirtualHost 192.168.200.1:443>
>
> Best reagards
>
> --- EdwardSPL@ita.org.mo wrote:
> > 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
> >
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
> ---------------------------------------------------------------------
> 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


Re: Problem of Virtual host

Posted by kaushik kanni <ro...@yahoo.com>.
Hi, please note my suggestion
You have to mention the port number along when u
mention the IP for the virtual host
Ex: <VirtualHost 192.168.200.1>
Should be set as <VirtualHost 192.168.200.1:80>
and for SSL
<VirtualHost 192.168.200.1:443>

Best reagards




--- EdwardSPL@ita.org.mo wrote:
> 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
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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