Welcome! Log In Create A New Profile

Advanced

Re: Double Redirect

Edho Arief
June 25, 2016 10:50PM
Hi,

On Sun, Jun 26, 2016, at 06:09, Lebod wrote:
> My complete set up is below. The only difference is the use of
> "example.com"
> instead of the domain for privacy reasons.I was really hoping that a
> gracious person would just point out the mistake in the set up if there
> is
> one...
>
> server {
> listen 80;
> listen 443 ssl;
> server_name example.com ***IP Address***;
> return 301 https://www.example.com$request_uri;
> }
>
> server {
> listen 80;
> server_name www.example.com;
> return 301 https://www.example.com$request_uri;
> }
>
> server {
> listen 443 ssl http2;
> server_name www.example.com;
> root /home/forge/example.com/public;
>
> index index.html index.htm index.php;
>
> charset utf-8;
>
> # FORGE CONFIG (DOT NOT REMOVE!)
> include forge-conf/example.com/server/*;
>
> location / {
> try_files $uri $uri/ /index.php?$query_string;
> }
>
> location = /favicon.ico { access_log off; log_not_found off; }
> location = /robots.txt { access_log off; log_not_found off; }
>
> access_log off;
> error_log /var/log/nginx/example.com-error.log error;
>
> error_page 404 /index.php;
>
> location ~* ^/***A CERTAIN BLOCKED DIRECTORY**** {
> auth_basic "closed website";
> auth_basic_user_file /etc/nginx/htpasswd;
> allow IP1;
> allow IP2;
> allow IP3;
> allow IP4;
> deny all;
>
> location ~* .(php) {
> fastcgi_split_path_info ^(.+\.php)(/.+)$;
> fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
> fastcgi_index index.php;
> include fastcgi_params;
> }
> try_files $uri $uri/ /index.php?$query_string;
> }
>
> location ~ \.php$ {
> fastcgi_split_path_info ^(.+\.php)(/.+)$;
> fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
> fastcgi_index index.php;
> include fastcgi_params;
> }
>
> # Media: images, icons, video, audio, HTC
> location ~* \.(?:jpg|jpeg|png|gif|ico|css|js|svg|woff)$ {
> expires 1M;
> add_header Cache-Control "public";
> }
>
> # CSS and Javascript
> location ~* \.(?:css|js)$ {
> expires 1M;
> access_log off;
> add_header Cache-Control "public";
> }
>
> # cache.appcache, your document html and data
> location ~* \.(?:manifest|appcache|html?|xml|json)$ {
> expires -1;
> # access_log logs/static.log; # I don't usually include a static log
> }
>
> location ~ /\.ht {
> deny all;
> }
>
> if ($allowed_country = no) {
> return 444;
> }
> }
>

That doesn't seem to be the output of `nginx -T`.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Double Redirect

Lebod June 19, 2016 05:12PM

Re: Double Redirect

itpp2012 June 19, 2016 05:16PM

Re: Double Redirect

Lebod June 20, 2016 05:05PM

Re: Double Redirect

itpp2012 June 20, 2016 05:51PM

Re: Double Redirect

Lebod June 20, 2016 05:59PM

Re: Double Redirect

itpp2012 June 20, 2016 06:24PM

Re: Double Redirect

Francis Daly June 19, 2016 07:16PM

Re: Double Redirect

Lebod June 24, 2016 12:45AM

Re: Double Redirect

Francis Daly June 24, 2016 08:32PM

Re: Double Redirect

Lebod June 25, 2016 01:42AM

Re: Double Redirect

Edho Arief June 25, 2016 01:52AM

Re: Double Redirect

Lebod June 25, 2016 05:09PM

Re: Double Redirect

Edho Arief June 25, 2016 10:50PM

Re: Double Redirect

Lebod June 26, 2016 12:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 182
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready