Forum Moderators: phranque
What could be the problem here? I never had this problem before I setup an SSL enabled virtual host for the payment section of my site (could be coincidence though). This SSL payment gateway all works fine.
I have temporarily reset the DNS on all of the duplicating domain names but its too late to stop my site being multi indexed by the mighty googlebot!
What is weird though is my apache setup only works when my internal IP is used for the virtual hosts? Is this correct? When I change it to my actual external IP none of my sites work?
Heres how my httpd.conf is setup**********************
NameVirtualHost 192.168.**.**:80
<VirtualHost 192.168.**.**:80>
ServerAdmin webmaster@mysite1.com
DocumentRoot /var/www/html/mysite1.com
ServerName mysite1.com
ServerAlias www.mysite1.com mysite1.com
ErrorLog /var/log/httpd/mysite1.com/mysite1.com -errorlog
CustomLog /var/log/httpd/mysite1.com/mysite1.com-accesslog combined
#Options ALL
</VirtualHost>
<VirtualHost 192.168.**.**:80>
ServerAdmin webmaster@mysite2.com
DocumentRoot /var/www/html/mysite2.com
ServerName mysite2.com
ServerAlias www.mysite2.com mysite2.com
ErrorLog /var/log/httpd/mysite2.com/mysite2.com -errorlog
CustomLog /var/log/httpd/mysite2.com/mysite2.com-accesslog combined
#Options ALL
</VirtualHost>
<VirtualHost 192.168.**.**:443>
#SSL (start)
SSLEngine on
SSLOptions +StrictRequire
<Directory />
SSLRequireSSL
</Directory>
SSLProtocol -all +TLSv1 +SSLv3
# Support only for strong cryptography
#and more config options I cant really list :)
# SSL (Ends)
ServerAdmin webmaster@mainsite.com
DocumentRoot /var/www/html/mainsite.com
ServerName secure.mainsite.com
ErrorLog /var/log/httpd/mainsite.com/mainsite-ssl-errorlog
CustomLog /var/log/httpd/mainsite.com/mainsite-ssl-accesslog combined
#Options ALL
</VirtualHost>
Phew! Sorry for the length of this post!
If anyone can help I would be very grateful. thanks
See the penultimate paragraph (with bolded text) in the Using Name-based Virtual Hosts section of the Apache Name-based Virtual Hosts [httpd.apache.org] document.
I'm not sure that this had anything to do with SSL -- More likely, it had to do with changes to your VirtualHost containers that you made at the same time as implementing SSL.
Your server works with the 'real' hardware address of the NIC plugged into it, and has no knowledge of the IP address(es) port-forwarded by your modem/router.
Jim