ssl/non-ssl
jeff emminger
jemminger at gmail.com
Fri Jun 20 07:47:33 MSD 2008
I have two php sites running, site1 under ssl and site2 is not.
site1 redirects all port 80 traffic to port 443. i have noticed
however if i try to access site2 using https, it will serve site1...
is there a way to redirect all attempts to access site2 via port 443
back to port 80?
i tried just adding a rule to redirect all site2 traffic from port 443
to 80 like so but it didn't work:
server {
listen 80;
server_name site1.com;
rewrite ^/(.*) https://site1.com/$1 permanent;
}
server {
listen 443;
server_name site1.com;
}
server {
listen 80;
server_name site2.com;
}
server {
listen 443;
server_name site2.com;
rewrite ^/(.*) http://site2.com/$1 permanent;
}
More information about the nginx
mailing list