Welcome! Log In Create A New Profile

Advanced

Re: redirection issue

Adie Nurahmadie
October 02, 2014 01:46PM
On Fri, Oct 3, 2014 at 12:39 AM, Adie Nurahmadie <nurahmadie@gmail.com>
wrote:

>
> On Fri, Oct 3, 2014 at 12:33 AM, Kurogane <nginx-forum@nginx.us> wrote:
>
>> No.
>>
>
> There is your problem, the config supposed to looks like this:
>
> server {
> listen 80 default_server;
> server_name localhost;
> root /home/nginx/default/public;
> }
>
>
> server {
> listen 80;
> server_name domain.com;
> return 301 $scheme://www.domain.com$request_uri;
> }
>
> server {
> listen 80;
> server_name www.domain.com;
> root /home/user/public_html;
>
> # proceed with the rest of the config down here
> # ...
> }
>
> Also, it's not mandatory, but I think you should set the default_server on
> the www.domain.com server block
> instead of localhost.
>
> Posted at Nginx Forum:
>> http://forum.nginx.org/read.php?2,253713,253715#msg-253715
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
>
> --
> regards,
> Nurahmadie
> --
>

For reference, http://nginx.org/en/docs/http/converting_rewrite_rules.html

--
regards,
Nurahmadie
--
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

redirection issue

Kurogane October 02, 2014 01:22PM

Re: redirection issue

Adie Nurahmadie October 02, 2014 01:28PM

Re: redirection issue

Kurogane October 02, 2014 01:33PM

Re: redirection issue

Adie Nurahmadie October 02, 2014 01:40PM

Re: redirection issue

Adie Nurahmadie October 02, 2014 01:46PM

Re: redirection issue

Kurogane October 02, 2014 01:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready