multiple vhost and redirect problem

jeff emminger jemminger at gmail.com
Mon Jul 21 06:30:51 MSD 2008


Doh, it always seems I figure it out only after posting to the list.
I had a stupid typo in the conf, server_name was ".com" instead of
".us"


On Sun, Jul 20, 2008 at 10:24 PM, jeff emminger <jemminger at gmail.com> wrote:
> I have two sites, site-a and site-a-test.  site-a will redirect
> requests on port 80 to 443, but site-a-test only accepts requests on
> 80.  the following setup is working flawlessly on one machine:
>
> # site-a.conf:
> server {
>    listen 80;
>    server_name site-a.us;
>    rewrite ^/(.*) https://site-a.us/$1 permanent;
>    ...
> }
>
> server {
>    listen    443;
>    server_name  site-a.us;
>    ...
> }
>
> # site-a-test.conf:
> server {
>    listen 80;
>    server_name site-a-test.us;
>    ...
> }
>
> My problem is that this identical conf on another machine (both
> running 0.6.31) will only allow me to reach site-a... any request to
> site-a-test is also being redirected to https://site-a.us/
>
> Any ideas?
> -Jeff
>





More information about the nginx mailing list