virtual host configuration problem
"Swanand P Bhorkar" <[email protected]>
| Newsgroups | gmane.linux.redhat.release.guinness,gmane.spam.detected |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I am configuring virtual hosts on the apache 1.3.20.
My virtual hosts for port 80 are working properly but the ones on
the port 443 are giving some problems.
I need one virtual host by the name test.net and its document root
is /var/www/html/test. Another virtual host i need is *.test.net
and its document root i want is /var/www/html/test/patient.
Is there any way such that when i type https://test.net i sould
get the index.html page of the /var/www/html/test directory and
when i type xyz.test.net i get the index.html page of the
/var/www/html/test/patient directory.
This is how i have configured the virtual hosts (port 80)
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/test/patient
ServerName *.test.net
ErrorLog logs/test-net-error_log
CustomLog logs/test-net-access_log common
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/test
ServerName test.net
ErrorLog logs/test1-net-error_log
CustomLog logs/test1-net-access_log common
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
ServerName original.net # this is the original server name
ErrorLog logs/orig-net-error_log
CustomLog logs/orig-net-access_log common
</VirtualHost>
But the virtual host config for port 443 is not working.
<VirtualHost xxx.xxx.xxx.xxx:443>
DocumentRoot /var/www/html/test/patient
ServerName *.test.net
ErrorLog logs/test-m-error_log
CustomLog logs/test-m-access_log common
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:443>
DocumentRoot /var/www/html/test
ServerName test.net
ErrorLog logs/test1-m-error_log
CustomLog logs/test1-m-access_log common
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<VirtualHost xxx.xxx.xxx.xxx:443>
DocumentRoot /var/www/html
ServerName original.net # original server name
ErrorLog logs/orig-m-error_log
CustomLog logs/orig-m-access_log common
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
THIS IS VERY VERY URGENT.CAN ANYONE PLEASE SUBMIT SOME IDEAS.
THANKS, IN ADVANCE.
Thanks
Swanand bhorkar