Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSL & non-SSL VirtualHost at the same IP

Status
Not open for further replies.

mjdawson5232

Programmer
Aug 6, 2001
2
US
Thank you very much in advance!!

I've been trying for some time to set up a secure login area set up off of one of my sites without success. The main site area needs to remain non-SSL, but the secure area (through a login sequence) needs to be SSL capable. When you click the login button the browser just hangs and times out. I am including the server config and key pieces of the the httpd.conf file.

Thanks again for any advice.

Apache/1.3.20 (Unix) AuthMySQL/2.20 PHP/4.0.5 mod_ssl/2.8.4 OpenSSL/0.9.6a

--------------
httpd.conf
--------------

ServerType standalone
ServerRoot "/usr/local"

Port 80
<IfDefine SSL>
Listen 80
Listen 443
</IfDefine>

User nobody
Group nobody

NameVirtualHost 61.113.5.26

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/etc/apache/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/server.key
<Directory &quot;/usr/local/ SSLOptions +StdEnvVars
</Directory>
<Files ~ &quot;\.(cgi|shtml|phtml|php3?)$&quot;>
SSLOptions +StdEnvVars
</Files>
SetEnvIf User-Agent &quot;.*MSIE.*&quot; nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
CustomLog /var/log/ssl_request_log &quot;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \&quot;%r\&quot; %b&quot;
SSLVerifyClient 0


<VirtualHost DocumentRoot /usr/local/share/doc/apache/htdocs
ServerName ...
SSLDisable
</VirtualHost>


<VirtualHost DocumentRoot /usr/local/share/doc/apache/htdocs01
ServerName ...
RewriteEngine on
RewriteRule ^/restricted(.*) [R,L]
SSLDisable
</VirtualHost>
<VirtualHost _default_:443>
DocumentRoot /usr/local/share/doc/apache/htdocs01/restricted
ServerName secure.site2.com
...
SSLEnable
</VirtualHost>


<IfDefine SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfDefine>

<IfModule mod_ssl.c>
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/var/run/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/var/run/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog /var/log/ssl_engine_log
SSLLogLevel info
</IfModule>
 
I believe you have to add another NameVirtualHost Directive before the beginning of the ssl container. Are you behing a firewall?


Rninja
 
Yes, I am behind a firewall.

I've played with NameVirtualHost directives like:
NameVirtualHost 61.113.5.26:80
NameVirtualHost 61.113.5.26:443
without success, but perhaps you have another suggestion.

Mike
 
check out my faq about virtualhosts, but the simple solution is to use the internal IP such as reserved addresses like :
192.168.1.1 and 10.0.0.1 etc...


Hope This helps!!!

Rninja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top