Welcome! Log In Create A New Profile

Advanced

Re: Nginx Location Block

Julian De Marchi
May 26, 2015 08:44PM
On 27/05/15 10:15, Francis Daly wrote:
> Does the backend configuration include anything that would log to a
> different access log, or not log at all?

Apparently so... When I access via the frontend my error log for the
backend looks like below. Which is quite normal.

[haweb-05.vpn] 10:31:58 [err] [local7] [nginx] 2015/05/27 10:31:58
[error] 5060#0: *135068 FastCGI sent in stderr: "Primary script unknown"
while reading response header from upstream, client: 10.106.1.19,
server: example.com, request: "GET /cms/index.php HTTP/1.0", upstream:
"fastcgi://unix:/var/run/php53-fpm.sock:", host: "example.com"

However when I modify my hosts file to talk directly to one of my
backend servers I get the 404. I'll figure out the logs later, but now I
have the answers I'm after and the culprit of my issue.

location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldnt be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}

Thanks for your help.

--julian

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

Nginx Location Block

Julian De Marchi May 25, 2015 01:46AM

Re: Nginx Location Block

Aleksandar Lazic May 25, 2015 03:06AM

Re: Nginx Location Block

Julian De Marchi May 25, 2015 04:12AM

Re: Nginx Location Block

Francis Daly May 26, 2015 07:48PM

Re: Nginx Location Block

Julian De Marchi May 26, 2015 08:00PM

Re: Nginx Location Block

Francis Daly May 26, 2015 08:16PM

Re: Nginx Location Block

Julian De Marchi May 26, 2015 08:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
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