Re: Rewrite before regex location

2016-05-06 Thread Robert Paprocki
See http://nginx.org/en/docs/http/ngx_http_core_module.html#location: 'The “@” prefix defines a named location. Such a location is not used for a regular request processing, but instead used for request redirection. They cannot be nested, and cannot contain nested locations.' On Fri, May 6, 2016

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
Oops! The local configuration was *location ^~ @rewrite_news {...}* On Sat, May 7, 2016 at 3:54 AM, Joyce Babu wrote: > It is working fine on my mac. But when I try to use it on my Cent OS > server, it is failing with error > > nginx: [emerg] location "[^/]\.php$" cannot be inside the named loca

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
It is working fine on my mac. But when I try to use it on my Cent OS server, it is failing with error nginx: [emerg] location "[^/]\.php$" cannot be inside the named location "@rewrite_news" Both are running version 1.10.0 :( ___ nginx mailing list ngin

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
> > That's because your fastcgi_split_path_info pattern does not match - > .php is not followed by / in your rewritten url. > > Because of the location{} you are in, it is probably simplest to just > replace the second capture part of that pattern with (.*)$. > Thank you Francis. It worked after f

Re: Rewrite before regex location

2016-05-06 Thread Joyce Babu
Thank you for the suggestion, Anoop. I did not want to do that since it would be evaluated for every request. On Thu, May 5, 2016 at 7:52 AM, Anoop Alias wrote: > Hi , > > Can you try putting the rewrite in server{} block outside of all > location{} blocks like > > rewrite "^/test/([a-z]+).php$"

Nginx always searches index.php in the wrong directory

2016-05-06 Thread Issam2204
Hello! I have a web root directory pointing to /var/www/html. I have several subfolders in /var/www/html where I host different projects. Example: /var/www/html/chatserver When I try to access http:// MYSERVER.net/chatserver I always have an error because Nginx tries to search for the index.php

a strange log

2016-05-06 Thread Christophe Bresso
Hi, I have a strange log from 169.229.3.91 (University of California at Berkeley ISTDATA (NET-169-229-0-0-2) 169.229.0.0 - 169.229.255.255). [06/May/2016:13:03:10 +0200] 5\xF5\x13\xED\xCA upstream_response_time - msec 1462532590.541 request_time 0.150 Is it usual to use command char in hea

Re: openshift-nginx docker image running as non-root

2016-05-06 Thread Aleksandar Lazic
Am 05-05-2016 19:14, schrieb Paulo Leal: Hi, I added the lines to my dockerfile Run ... && chmod 777 /var/log/nginx / && rm -rf /var/log/nginx/error.log / && rm -rf /var/log/nginx/access.log It worked for me! When you want to read the files you call ### oc rsh cat /var/log/nginx

Re: Rewrite before regex location

2016-05-06 Thread B.R.
As a sidenote, why using location ~ ^/php-fpm/ and not location /php-fpm/ ? Although being distant to your case (I see others are helping you nicely :o) ), I can but particularly note & enjoy the use of a non-greedy modifier in the regex part of fastcgi_split_path_info intended to result in $fastc

Re: Replace apache with nginx

2016-05-06 Thread B.R.
There is plenty of information around here for you to start. Instead of coming here for pre-cooked recipes, you should show you at least tried... You could read the docs