Hello,
I have a little but I found that I'd like to report.
I am using the NameVirtualHost facility of Apache together with SSL. The
problem comes with the environment variable DOCUMENT_ROOT that Apache is
setting.
When using http to connect, loading up a phpinfo.php page will give the
environment variables set. If I were to use site1, DOCUMENT_ROOT is set
to /home/httpd.dev/site1.com, and site2.com will correctly give
/home/httpd/site2.com.
When using https to connect, loading up a phpinfo.php page from
site1.com will give DOCUMENT_ROOT correctly at
/home/httpd.dev/site1.com, and site2.com is wrong and says DOCUMENT_ROOT
is /home/httpd.dev/site1.com as well (which breaks some of our php
scripts). If I were to reverse the VirtualHost entries for the SSL
section of site1.com and site2.com, the situation is also reversed.
DOCUMENT_ROOT for both the SSL version of site1 and site2 become
/home/httpd/site2.com.
Does anyone know of a way to fix this problem?
Thanks,
Tom
Here is a snippet of config info from httpd.conf:
NameVirtualHost 192.168.1.1
<VirtualHost 192.168.1.1>
DocumentRoot /home/httpd.dev/site1.com
ServerName site1.com
# ErrorLog logs/site1.com-error_log
CustomLog /etc/httpd/logs/site1.com-access_log common
</VirtualHost>
<VirtualHost 192.168.1.1>
DocumentRoot /home/httpd/site2.com
ServerName site2.com
# ErrorLog logs/site2.com-error_log
CustomLog /etc/httpd/logs/site2.com-access_log common
</VirtualHost>
...
<VirtualHost 192.168.1.1:443>
DocumentRoot /home/httpd.dev/site1.com
ServerName site1.com
# ErrorLog logs/site1.com-error_log
CustomLog /etc/httpd/logs/site1.com-access_log common
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
<Files ~ "\.(cgi|shtml|phtml|php|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/home/httpd/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
CustomLog /var/log/httpd/site1.com-ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
<VirtualHost 192.168.1.1:443>
DocumentRoot /home/httpd/site2.com
ServerName site2.com
# ErrorLog logs/site2.com-error_log
CustomLog /etc/httpd/logs/site2.com-access_log common
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
<Files ~ "\.(cgi|shtml|phtml|php|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/home/httpd/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
CustomLog /var/log/httpd/site2.com-ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl) www.modssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]