Re: rewriting $arg into request.

2020-01-31 Thread Steve Wilson
On 31/01/2020 12:37, Reinis Rozitis wrote: if ($arg_p) { return 301http://yoursite/p/$arg_p; } This is what I was originally looking for, however as I've only 20 pages to manage the individual redirects via the map directive I believe will work better as it will remove a additional r

Re: rewriting $arg into request.

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 12:11:54PM +, Steve Wilson wrote: Hi there, > Hugo's alias basically creates a /alias/index.html file which contains a > meta refresh. Ah, ok. Presumably there would have to be some web server config needed to make the incoming request actually serve that file -- I th

RE: rewriting $arg into request.

2020-01-31 Thread Reinis Rozitis
> > if ($args ~ "^p=(\d+)") { > set $page $1; > set $args ""; > rewrite ^.*$ /p/$page last; > break; > } > > I knew there'd be a simpler way and I due to the time

Re: rewriting $arg into request.

2020-01-31 Thread Steve Wilson
Hugo's alias basically creates a /alias/index.html file which contains a meta refresh. I managed to find something using an if which does the job, however using the map solution presented is much more elegant as it would reduce the redirects.     if ($args ~ "^p=(\d+)") {  

Re: rewriting $arg into request.

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 01:13:30AM +, Steve Wilson wrote: Hi there, > Currently wordpress is using ugly urls for posts, so "/?p=1234" in wordpress > might be "/this_nice_title" in hugo. > Now hugo allows me to specify aliases too which I'd like to leverage to > maintain links, but this is whe

rewriting $arg into request.

2020-01-30 Thread Steve Wilson
I'm currently in the process of transitioning from wordpress to hugo. For anyone not familiar with these, wordpress is php based and hugo outputs static content (keeping it simple) Currently wordpress is using ugly urls for posts, so "/?p=1234" in wordpress might be "/this_nice_title" in hugo. N

Re: Rewriting query string

2019-12-30 Thread Francis Daly
On Sun, Dec 29, 2019 at 04:41:58AM -0500, Olaf van der Spek wrote: Hi there, > > rewrite ^(.*)$ $1?ra=$remote_addr break; > > The ra argument is inserted before the original query string. Is it possible > to append it to the original query string? Something like rewrite ^(.*)$ $1?$args&ra=$r

Re: Rewriting query string

2019-12-29 Thread Sergey A. Osokin
Hi Olaf, hope you're doing well. On Sun, Dec 29, 2019 at 04:41:58AM -0500, Olaf van der Spek wrote: > > rewrite ^(.*)$ $1?ra=$remote_addr break; > > The ra argument is inserted before the original query string. Is it possible > to append it to the original query string? > Is this behavior docume

Rewriting query string

2019-12-29 Thread Olaf van der Spek
> rewrite ^(.*)$ $1?ra=$remote_addr break; The ra argument is inserted before the original query string. Is it possible to append it to the original query string? Is this behavior documented somewhere? Couldn't find it. Can one also remove certain arguments from the query string this way? Posted

Re: Rewriting url in nginx

2019-09-12 Thread Aleksandar Lazic
Am 12.09.2019 um 08:08 schrieb Zeeshan Opel: > I am trying to rewrite a url in nginx.  > > When i am accessing mail.parco.net.pk in browser, it > opens below link: > > http://mailsvr.parco.net.pk/mailsvr/mail/mailbox.nsf > But in actual it should open  http://mailsvr.parco.net.pk/mail/mailbox.nsf

Re: Rewriting url in nginx

2019-09-12 Thread Zeeshan Opel
Please help On Thu, Sep 12, 2019 at 11:08 AM Zeeshan Opel wrote: > I am trying to rewrite a url in nginx. > > When i am accessing mail.parco.net.pk in browser, it opens below link: > > http://mailsvr.parco.net.pk/mailsvr/mail/mailbox.nsf > But in actual it should open http://mailsvr.parco.net.p

Rewriting url in nginx

2019-09-11 Thread Zeeshan Opel
I am trying to rewrite a url in nginx. When i am accessing mail.parco.net.pk in browser, it opens below link: http://mailsvr.parco.net.pk/mailsvr/mail/mailbox.nsf But in actual it should open http://mailsvr.parco.net.pk/mail/mailbox.nsf Below is my nginx conf file. worker_processes 1; worker_

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
t 17.37 > To: "nginx@nginx.org" > Subject: Re: URL-Rewriting not working > > Hi Francis. > > On Sun, Apr 9, 2017 at 8:47 PM, Francis Daly wrote: > >> On Sun, Apr 09, 2017 at 06:36:51PM +0530, Ajay Garg wrote: >

Re: URL-Rewriting not working

2017-04-09 Thread Lucas Rolff
-boun...@nginx.org>> on behalf of Ajay Garg mailto:ajaygargn...@gmail.com>> Reply-To: "nginx@nginx.org<mailto:nginx@nginx.org>" mailto:nginx@nginx.org>> Date: Sunday, 9 April 2017 at 17.37 To: "nginx@nginx.org<mailto:nginx@nginx.org>" mailto:nginx@nginx.o

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Hi Francis. On Sun, Apr 9, 2017 at 8:47 PM, Francis Daly wrote: > On Sun, Apr 09, 2017 at 06:36:51PM +0530, Ajay Garg wrote: > > Hi there, > > > Got it Francis !! > > Good news. > > > location / { > > auth_basic 'Restricted'; > >

Re: URL-Rewriting not working

2017-04-09 Thread Francis Daly
On Sun, Apr 09, 2017 at 06:36:51PM +0530, Ajay Garg wrote: Hi there, > Got it Francis !! Good news. > location / { > auth_basic 'Restricted'; > auth_basic_user_file > /home/20da689b45c84f2b80bc84d651

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Got it Francis !! server { listen 2001 ssl; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; location / { auth_basic 'Restricted';

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Hi Francis. Thanks a ton for your suggestions. On Sun, Apr 9, 2017 at 5:58 PM, Francis Daly wrote: > On Sun, Apr 09, 2017 at 05:27:31PM +0530, Ajay Garg wrote: > > Hi there, > > > Unfortunately, our backen-service(s) (on port 2000 in the example) is > > ssh-reverse-tunnel, having two layers of

Re: URL-Rewriting not working

2017-04-09 Thread Francis Daly
On Sun, Apr 09, 2017 at 05:27:31PM +0530, Ajay Garg wrote: Hi there, > Unfortunately, our backen-service(s) (on port 2000 in the example) is > ssh-reverse-tunnel, having two layers of machines behind them. The > terminating-node for sure cannot be changed. "In general", reverse-proxying to a dif

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
30, Ajay Garg wrote: > > Hi there, > > > However, I am not able to do the proxying if I perform url-rewriting. > > Nothing of the following works :: > > Note that if you want to reverse-proxy a back-end web service at a > different part of the url hierarchy to where it

Re: URL-Rewriting not working

2017-04-09 Thread Francis Daly
On Sat, Apr 08, 2017 at 06:39:59PM +0530, Ajay Garg wrote: Hi there, > However, I am not able to do the proxying if I perform url-rewriting. > Nothing of the following works :: Note that if you want to reverse-proxy a back-end web service at a different part of the url hierarchy to wh

Re: URL-Rewriting not working

2017-04-08 Thread Ajay Garg
listen 2001; >>>> location / { >>>> >>>> auth_basic 'Restricted'; >>>> auth_basic_user_file >>>> /home/2819163155b64c4c81f8608aa23c9faa/.h

Re: URL-Rewriting not working

2017-04-08 Thread Anoop Alias
'Restricted'; >>> auth_basic_user_file >>> /home/2819163155b64c4c81f8608aa23c9faa/.htpasswd; >>> proxy_pass http://127.0.0.1:2000; >>> } >>> } >>> >>> # >>

Re: URL-Rewriting not working

2017-04-08 Thread Ajay Garg
auth_basic_user_file >> /home/2819163155b64c4c81f8608aa23c9faa/.htpasswd; >> proxy_pass http://127.0.0.1:2000; >> } >> } >> #### >&

Re: URL-Rewriting not working

2017-04-08 Thread Anoop Alias
> auth_basic_user_file /home/ > 2819163155b64c4c81f8608aa23c9faa/.htpasswd; > proxy_pass http://127.0.0.1:2000; > } > } > > # > > > > H

URL-Rewriting not working

2017-04-08 Thread Ajay Garg
0.0.1:2000; } } # However, I am not able to do the proxying if I perform url-rewriting. Nothing of the following works :: a) server { listen 2001; lo

Rewriting a "multipart/form-data" request to a "binary" "x-www-form-urlencoded" request

2016-01-16 Thread Jon Kristensen
Hi, everyone! I would like to know if there's a simple way to have Nginx rewrite a "multipart/form-data" request to a "x-www-form-urlencoded" request with only a (binary) file as the content. That is, I want the rewritten request to look like it was produced with the Curl --data-binary option. T

Re: Complex url rewriting

2015-11-24 Thread lmauldinpe15
I think this seems to be working for now. Does anyone see a problem with it: # define web root root /var/www/html/public; index index.php default.php index.html; location / { try_files $uri $uri/ =404; } location ~ [^/]\.php(/|$) { fastcgi_split_path_in

Re: Complex url rewriting

2015-11-24 Thread lmauldinpe15
If I followed your post correctly, you wanted me to make a map of locations. However, I want the users to be able to add a new directory (ex: /var/www/c/foo) and have a url like 'http://xxx/c/foo/index.php/users/login' automatically served by /var/www/c/foo/index.php without having to change Nginx

Re: Complex url rewriting

2015-11-23 Thread Aleksandar Lazic
setup url rewriting so that any request to http://xxx/a/foo/index.php/users/login gets redirected to http://xxx/a/foo/index.php and similarly http://xxx/a/bar/index.php/users/login gets redirected to http://xxx/a/bar/index.php I may have a large number of applications in the sub directories s

Re: Complex url rewriting

2015-11-23 Thread lmauldinpe15
Did you mean to use nested location blocks? I tried it but it didn't work. Here is the relevant part of my configuration file: # define web root root /var/www/html/public; index index.php index.html; location /index.php { location ~* (?:.*/index.php)(.*) { fa

Re: Complex url rewriting

2015-11-23 Thread B.R.
Hello, You do not necessarily need to *redirect* *per se*, but you wish content to be served by your index.php files. Would location /index.php { location ~* (?:.*/index.php)(.*) { fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_pass ; } } do the job? (untested) --

Re: Complex url rewriting

2015-11-23 Thread lmauldinpe15
Another note, on some of the application sub directories, I need to emulate this rule from .htaccess: RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php/$1 [QSA,L] Posted at Nginx Forum: https://forum.nginx.org/read.php?2,263024,263026#msg-263026 ___ nginx

Complex url rewriting

2015-11-23 Thread lmauldinpe15
I have a single Nginx installation and I am using PHP-FPM to serve multiple PHP applications in sub directories. Example: /var/www/ (this is 'root') /var/www/a/foo/index.php /var/www/a/bar/index.php /var/www/b/bar/index.php I want to setup url rewriting so that any request to http:/

Re: Best practice for URL rewriting with php parameter

2015-11-15 Thread Francis Daly
On Thu, Nov 12, 2015 at 11:04:50PM +, Mik J wrote: Hi there, > I tried again your solution from yesterday and didn't manage to make it work If you have one solution that works well enough for you, use it. It is usually not worth spending more time preparing something than will be saved by us

Re: Best practice for URL rewriting with php parameter

2015-11-12 Thread Mik J
Hello Francis, I tried again your solution from yesterday and didn't manage to make it work location = /information { rewrite ^ /index.php?x=information; }   location = /index.php {     fastcgi_pass 127.0.0.1:9000;    fastcgi_param SCRIPT_FILENAME $document_root$uri;     fastcgi_param QUERY_STRIN

Re: Best practice for URL rewriting with php parameter

2015-11-11 Thread Francis Daly
On Wed, Nov 11, 2015 at 06:50:54PM +, Mik J wrote: Hi there, > I tried both methods but none of them worked. I'm going to look at it more in > details (and display the php logs because I just had a blank page). First configure things so that an explicit request for /index.php?x=information

Re: Best practice for URL rewriting with php parameter

2015-11-11 Thread Mik J
Hello Francis, First thank you for your answers I tried both methods but none of them worked. I'm going to look at it more in details (and display the php logs because I just had a blank page). Also I would like to know why the solution you're offering is a "best practice" ?At first it seems a b

Re: Best practice for URL rewriting with php parameter

2015-11-11 Thread Francis Daly
On Wed, Nov 11, 2015 at 02:29:37PM +, Mik J wrote: Hi there, > > I want that a user who accessesnginx.org/informationwill be redirected in > > the background tonginx/index.php?x=informationSo that my index.php page is > > dymanic > > What does "redirected in the background" mean?M => I jus

Re: Best practice for URL rewriting with php parameter

2015-11-11 Thread Mik J
Hi there, > I have checked many ways to implement what I want (including if is evil) and > I've been able to reach what I wanted to do (something simple) > I want that a user who accessesnginx.org/informationwill be redirected in the > background tonginx/index.php?x=informationSo that my index.p

Re: Best practice for URL rewriting with php parameter

2015-11-11 Thread Francis Daly
On Wed, Nov 11, 2015 at 01:14:31PM +, Mik J wrote: Hi there, > I have checked many ways to implement what I want (including if is evil) and > I've been able to reach what I wanted to do (something simple) > I want that a user who accessesnginx.org/informationwill be redirected in the > back

Best practice for URL rewriting with php parameter

2015-11-11 Thread Mik J
Hello, I have checked many ways to implement what I want (including if is evil) and I've been able to reach what I wanted to do (something simple) I want that a user who accessesnginx.org/informationwill be redirected in the background tonginx/index.php?x=informationSo that my index.php page is d

Re: URI rewriting based on arguments

2014-11-08 Thread B.R.
at 11:31 AM, B.R. wrote: > > Hello, > > > > Trying to rewrite an URI based on an argument, I cannot match it > otherwise > > than by using rewrite. > > > > The problem is I fail to achieve a working recipe rewriting > > example.com/watch?v=123456 > >

Re: URI rewriting based on arguments

2014-11-07 Thread Edho Arief
On Sat, Nov 8, 2014 at 11:31 AM, B.R. wrote: > Hello, > > Trying to rewrite an URI based on an argument, I cannot match it otherwise > than by using rewrite. > > The problem is I fail to achieve a working recipe rewriting > example.com/watch?v=123456 > to > e

URI rewriting based on arguments

2014-11-07 Thread B.R.
Hello, Trying to rewrite an URI based on an argument, I cannot match it otherwise than by using rewrite. The problem is I fail to achieve a working recipe rewriting example.com/watch?v=123456 to example.com/watch?vid=123456 rewrite ^/watch\?v=(?\d+)$ $scheme://$host$uri?vid=$video? does not

Re: Rewriting location directive by upstream servers

2014-09-30 Thread Francis Daly
On Fri, Sep 26, 2014 at 10:12:47AM +0530, thunder hill wrote: > On Fri, Sep 26, 2014 at 2:35 AM, Francis Daly wrote: > > On Fri, Sep 26, 2014 at 01:20:18AM +0530, thunder hill wrote: Hi there, > > > When I access mysite.com/app1 the upstream server rewrites the url like > > > mysite.com/login in

Re: Rewriting location directive by upstream servers

2014-09-25 Thread thunder hill
Hi, On Fri, Sep 26, 2014 at 2:35 AM, Francis Daly wrote: > On Fri, Sep 26, 2014 at 01:20:18AM +0530, thunder hill wrote: > > Hi there, > > > When I access mysite.com/app1 the upstream server rewrites the url like > > mysite.com/login instead of mysite.com/app1/login and the result is a > > blan

Re: Rewriting location directive by upstream servers

2014-09-25 Thread Francis Daly
On Fri, Sep 26, 2014 at 01:20:18AM +0530, thunder hill wrote: Hi there, > When I access mysite.com/app1 the upstream server rewrites the url like > mysite.com/login instead of mysite.com/app1/login and the result is a > blank page. > > Users are allowed either mysite.com/app1 or mysite.com/app2

Rewriting location directive by upstream servers

2014-09-25 Thread thunder hill
Hi, I have two back end application servers behind nginx. The configuration is as follows upstream backend1 { server 10.1.1.11; } upstream backend2 { server 10.2.2.2; } server { listen 80; server_name mysite.com; location /appl1 { #proxy_set_header X-Real

Re: 404 error with rewriting rule

2014-04-02 Thread Jonathan Matthews
On 1 Apr 2014 19:23, "skyice" wrote: > > Hello, > > With this rule : > > rewrite ^/([^/])(/.*) $2?locale=$1&$query_string last; Your first capture is looking for exactly 1 character. Do you really mean that? J ___ nginx mailing list nginx@nginx.org htt

Re: 404 error with rewriting rule

2014-04-01 Thread Francis Daly
On Tue, Apr 01, 2014 at 02:23:27PM -0400, skyice wrote: Hi there, > With this rule : > > rewrite ^/([^/])(/.*) $2?locale=$1&$query_string last; > > I get a 404 error when I try go on http://example.org/en/test.php instead of > http://example.org/test.php?locale=en Does this rewrite regex matc

404 error with rewriting rule

2014-04-01 Thread skyice
Hello, With this rule : rewrite ^/([^/])(/.*) $2?locale=$1&$query_string last; I get a 404 error when I try go on http://example.org/en/test.php instead of http://example.org/test.php?locale=en Anyone have any idea to solve the problem ? Thanks. Posted at Nginx Forum: http://forum.nginx.org

Re: Rewriting GET request parameters while configured as a reverse proxy

2014-01-21 Thread B.R.
It seems your syntax is obsolete. Have a look at http://nginx.org/en/docs/http/converting_rewrite_rules.html where it is explicitly written. It is also explicitely wriiten on the wiki page you visited that the resource is obsolete and that you should use http://nginx.org/en/docs/http/ngx_http_rewri

Rewriting GET request parameters while configured as a reverse proxy

2014-01-21 Thread Rv Rv
Hello Is there a way to make nginx rewrite the GET request parameters while configured as a reverse proxy. e.g. if nginx receives a request GET / foo.html?abc=123 , can nginx rewrite it to GET /foo.html?abc=456 (nginx admin specifies 123 to be changed to 456) and then do a proxy pass to the orig

Re: Url rewriting faliure in case of UTF8 urls

2013-12-05 Thread Francis Daly
On Wed, Dec 04, 2013 at 07:42:17PM -0500, omidr wrote: Hi there, > As an example I want to redirect "/آرایشگر" to "/استخدام آرایشگر" and I am > using a rewrite rulr like the one below but things go wrong and I get a > 404. Can I suggest you try to simplify the test case, so that you can see what

Re: Url rewriting faliure in case of UTF8 urls

2013-12-04 Thread omidr
As an example I want to redirect "/آرایشگر" to "/استخدام آرایشگر" and I am using a rewrite rulr like the one below but things go wrong and I get a 404. rewrite_rule: rewrite ^/آرایشگر/$ /استخدام آرایشگر; And what do you mean by config? Do you mean nginx settings or configurations at compile time?

Re: Url rewriting faliure in case of UTF8 urls

2013-12-04 Thread Francis Daly
On Wed, Dec 04, 2013 at 08:22:42AM -0500, omidr wrote: Hi there, > But when it comes to urls containing non-English characters the rule doesn`t > work. Has anyone experienced the same issue? It seems to work for me. What config do you use, what request do you make, what response do you get?

Url rewriting faliure in case of UTF8 urls

2013-12-04 Thread omidr
I want to rewrite some old urls on my site to new ones inorder to prevent 404 errors. For English urls everything is OK and adding a rewrite rule like the following to the server block works fine. rewrite ^/omid/$ /omidreza; But when it comes to urls containing non-English characters the rule doe

Re: File Checking Rewriting and Handing off to Back End

2013-11-10 Thread David Legg
On 08/11/2013 22:43, "Francis Daly" wrote: >The arguments to try_files are prefixed with the current $document_root >before being sought as files (with the final argument being magic). > >So if you put your to-be-served file in the correct place, and use the >variables correctly, then it should J

Re: File Checking Rewriting and Handing off to Back End

2013-11-08 Thread Francis Daly
On Fri, Nov 08, 2013 at 05:51:36AM -0600, David Legg wrote: > I've been trying various things out through try_files which I think is the > right area to be looking at. Something like: > > try_files /tiles/$args_z_$args_x_$args_y.png proxy_hand_off > > Any ideas how I could do this? The argumen

File Checking Rewriting and Handing off to Back End

2013-11-08 Thread David Legg
Hi All, We're starting to make more and more heavy use of Nginx having shifted from Apache, mostly in handing off to backends running Puma and php-fpm. However, wherever possible we naturally want Nginx to serve what it can with only the bare minimum hitting the back end. However, this generall

Re: Rewriting pages to re-rendered snapshots

2013-07-01 Thread Jonathan Matthews
Duplicate your entire "location / {}" as "location = / {}" (which matches *only* "/"), and when you detect google, serve /snapshots/whatever/index.html. Jonathan ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Rewriting pages to re-rendered snapshots

2013-07-01 Thread rootberry
Not sure what you mean Jonathan, I can already detect the Google bot by using ?_escaped_fragment= which is also Google's preferred way over user agent sniffing. I just need to adapt the rewrite rule to serve index.html to requests for /. Thanks for the reply, though! Posted at Nginx Forum: http:

Re: Rewriting pages to re-rendered snapshots

2013-07-01 Thread Jonathan Matthews
I'm sure others will give you better methods to sort this but, as a temporary fix, how about a separate stanza like this: location = / { #special index.html UA-sniffing + rewrite logic } Cheers, Jonathan ___ nginx mailing list nginx@nginx.org http://

Rewriting pages to re-rendered snapshots

2013-07-01 Thread rootberry
I have a very Javascript heavy website which is being served by nginx. It all works great, except Google is having trouble indexing me. I've made pre-rendered snapshots of all my pages using Phantomjs and these are stored in /snapshots (relative to my website's root). I've been using this rewrite

Re: Rewriting and proxy problem

2013-05-27 Thread Francis Daly
On Mon, May 27, 2013 at 11:31:37AM -0300, Sergio Belkin wrote: Hi there, > I'd want that when you type http://example.com/upvc proxies the > /var/lib/tomcat6/webapps/demo/ > demo3.jsp file to tomcat Just for clarity, "proxy_pass" proxies to a url, not to a file. So you probably want it to proxy

Re: Rewriting and proxy problem

2013-05-27 Thread Sergio Belkin
2013/5/27 Sergio Belkin > > 2013/5/25 Francis Daly > >> On Fri, May 24, 2013 at 02:39:58PM -0300, Sergio Belkin wrote: >> >> Hi there, >> >> > I am completeley newbie to nginx >> >> Welcome. >> >> The nginx config follows its own logic, which may not match your previous >> experiences. When you

Re: Rewriting and proxy problem

2013-05-27 Thread Sergio Belkin
2013/5/25 Francis Daly > On Fri, May 24, 2013 at 02:39:58PM -0300, Sergio Belkin wrote: > > Hi there, > > > I am completeley newbie to nginx > > Welcome. > > The nginx config follows its own logic, which may not match your previous > experiences. When you understand that, you'll have a much bette

Re: Rewriting

2013-05-26 Thread Francis Daly
turn http 503 with the content corresponding to /unav/index.html > > else > > give full normal access to the site > > My logic is: for all requests (from not an admin) like http://example.org/ > use rewriting and show for clients simple temp html page. I think that that sta

Re: Rewriting

2013-05-25 Thread Bozhidara Marinchovska
1\.[0-9]{0,3}') { rewrite ^/(.*)$ /unav/$1 break; } location / { } But in log 2013/05/24 08:49:45 [error] 76017#0: *1910 open() "/usr/local/www/akbmaster/unav/unav/index.html" failed (2: No such file or directory), client: 190.212.201.198, server: akbmaster.server.com, re

Re: Rewriting

2013-05-25 Thread Francis Daly
al/www/akbmaster/unav/unav/index.html" failed (2: No such file or > directory), client: 190.212.201.198, server: akbmaster.server.com, request: > "GET / HTTP/1.1", host: "akbmaster.server.com" > > I see twice rewriting. The initial request was for "/". The

Re: Rewriting and proxy problem

2013-05-25 Thread Francis Daly
On Fri, May 24, 2013 at 02:39:58PM -0300, Sergio Belkin wrote: Hi there, > I am completeley newbie to nginx Welcome. The nginx config follows its own logic, which may not match your previous experiences. When you understand that, you'll have a much better chance of knowing the configuration you

Re: Rewriting and proxy problem

2013-05-24 Thread B.R.
Let's start by a huge RTFM? http://nginx.org/en/docs/ This ML is no customer service for lazy people, I guess. You may up for services to make other people do your job: http://nginx.com/services.html Best regards, --- *B. R.* On Fri, May 24, 2013 at 1:39 PM, Sergio Belkin wrote: > H folks! >

Rewriting and proxy problem

2013-05-24 Thread Sergio Belkin
H folks! I am completeley newbie to nginx I have the following config # Forward request to /demo to tomcat. This is for # the BigBlueButton api demos. location /demo { rewrite ^ /upvc; proxy_pass http://127.0.0.1:8080; proxy_redir

Re: Re[2]: Rewriting

2013-05-24 Thread B.R.
g > > 2013/05/24 08:49:45 [error] 76017#0: *1910 open() > "/usr/local/www/akbmaster/unav/unav/index.html" failed (2: No such file or > directory), client: 190.212.201.198, server: akbmaster.server.com, > request: "GET / HTTP/1.1", host: "akbmaster.server.co

Re[2]: Rewriting

2013-05-23 Thread wishmaster
(2: No such file or directory), client: 190.212.201.198, server: akbmaster.server.com, request: "GET / HTTP/1.1", host: "akbmaster.server.com" I see twice rewriting. I have rewritten rule like this and this solved twice rewriting problem. rewrite ^/([^/]*)$ /unav/$1 break;

Re: Rewriting

2013-05-23 Thread Bozhidara Marinchovska
t { rewrite ^/(.+)$ /index.php?_route_=$1 last; } [...skipped...] location ~ \.php$ { try_files $uri =404; fastcgi_read_timeout 60s; fastcgi_send_timeout 60s; include myphp-fpm.conf; } Problem is in rewriting. This rule

Rewriting

2013-05-23 Thread wishmaster
files $uri =404; fastcgi_read_timeout 60s; fastcgi_send_timeout 60s; include myphp-fpm.conf; } Problem is in rewriting. This rule rewrite ^/(.*)$ /unav/$1 break; rewrite ONLY http://mysite.com/ request but in case http://mysite.com/i

Rewriting jpg with specific google referer to 1 pixel gif

2013-02-17 Thread Ian M. Evans
If I understand correctly, nginx doesn't do multiple conditions in an 'if' or nested if's. Based on some of the ideas being tossed around in this thread (http://www.webmasterworld.com/google/4537063-11-30.htm) I'd like to rewrite serve up a one pixel gif to whenever both of the two following condi