xjx424 Posted March 21, 2011 Share Posted March 21, 2011 Hi,I am using VirtualHosts on an apache server. I have multiple non-SSL sites working fine on port 80. I have added an SSL site on port 443 and it works fine. My problem is that I have a few pages/images on the SSL site that I can't access using SSL. If I add a virtual host for port 80 after the port 443 as shown below, all sites on the server redirect to the settings for port 80 for this particular site. <VirtualHost *:443>ServerName www.site.comServerAlias site.comDirectoryIndex index.phpDocumentRoot "/var/www/site.com/"SSLEngine onSSLOptions +StrictRequireSSLCertificateFile /etc/ssl/certs/server.crtSSLCertificateKeyFile /etc/ssl/private/server.key<Directory "/var/www/site.com/">allow from allOptions +Indexes</Directory></VirtualHost><VirtualHost www.site.com:80> (also tried *:80)DirectoryIndex index.phpDocumentRoot "/var/www/site.com/"ServerName site.comServerAlias www.site.com<Directory "/var/www/site.com/">allow from allOptions +Indexes</Directory></VirtualHost> How do I get the other sites to avoid this?Thanks Link to comment Share on other sites More sharing options...
xjx424 Posted March 21, 2011 Author Share Posted March 21, 2011 Switching the order fixed the problem.This:<VirtualHost *:80>Should go before<VirtualHost *:443> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.