ssl/non-ssl
Igor Sysoev
is at rambler-co.ru
Fri Jun 20 09:10:41 MSD 2008
On Thu, Jun 19, 2008 at 11:47:33PM -0400, jeff emminger wrote:
> 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;
> }
http://marc.info/?l=nginx&m=120992171505688
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list