Arguments from the requests are not taken into account when nginx choosing
locations.
Try to use the 'map' directive instead.
For example:
===
map $arg_target $backend {
'server1' 'server1';
'server2' 'server2';
default 'server1';
}
server {
listen 80;
location = /index.html {
proxy
On 2022-02-20 8:17 a.m., Dr_tux wrote:
Hello,
I want to write a rewrite like http://url/index.php?target=server1 and
http://url/target=server1 in Nginx and I want to use it in reverse proxy.
This is possible in AWS, but how can I do it in Nginx?
I tried as follows. Not worked.
location = /inde
Hello,
I want to write a rewrite like http://url/index.php?target=server1 and
http://url/target=server1 in Nginx and I want to use it in reverse proxy.
This is possible in AWS, but how can I do it in Nginx?
I tried as follows. Not worked.
location = /index.html?target=server1 {
proxy_pass htt
On Fri, Dec 15, 2017 at 05:32:25PM +0300, Александр Трофимчук wrote:
Hi there,
> Nevertheless I wonder why the following (almost similar) config works?
I don't see it as similar. Am I missing something?
> I get php output when requesting for
> http://site.com//files/imagecache/small/1.jpg
> Tho
Regards,
Alexander Trofimchouk
2017-12-15 16:18 GMT+03:00 Francis Daly :
> On Fri, Dec 15, 2017 at 03:48:20PM +0300, Alexander Trofimchouk wrote:
>
> Hi there,
>
> > My nginx rewrite works only if I add "permanent" directive. Without it
> there
> > is no rewrite
On Fri, Dec 15, 2017 at 03:48:20PM +0300, Alexander Trofimchouk wrote:
Hi there,
> My nginx rewrite works only if I add "permanent" directive. Without it there
> is no rewrite seen even in browser's network log.
http://nginx.org/r/rewrite
"rewrite" does not
Hello!
Please would you mind helping me.
My nginx rewrite works only if I add "permanent" directive. Without it there
is no rewrite seen even in browser's network log.
I have an image cache system which works this way:
- there is a folder for uploaded images ( )
- folder for s
I have an application in codeigniter.
This same application has a common code made in codeigniter and then
distributed in subdirectories each of which has a configuration, but
all pull the same common code.
The problem I have is that the application used to run in apache and
everything works corr
On Wed, Apr 26, 2017 at 12:32:27PM -0400, Kevin wrote:
Hi there,
> I'm trying to rewrite some route in cloud foundry static buildpack, but
> whenever I rewrite, the https goes to http.
>
> So I add return with / with /login, then it goes to http://server/, even it
> starts with https://server/lo
Hi,
I'm trying to rewrite some route in cloud foundry static buildpack, but
whenever I rewrite, the https goes to http.
So I add return with / with /login, then it goes to http://server/, even it
starts with https://server/login.
location /login {
return 301 /;
<% if ENV["FORCE_HTT
Hello guys,
I have a PS store 1.6.1.2, with Nginx 0.9.8 and php-fpm.
It is running almost 100%, just missing the Boleto and Transfer are. When I
finish the payment a 404 error is generated.
By my tests when I disable the rewrite it works perfectly.
Anyone know or could help me what parameters nee
Hi,
I will try to be brief. I have the following nginx rewrite url:
rewrite ^/(.*)?$ /index.php?completeURL=$1 last;
I want a url like:
http://mywebsite.com/http://www.otherwebsite.com/dir1/dirx/article.php&id=2&category=1
request:
http://mywebsite.com/index.php?complete
nanaya Wrote:
---
> Also in case of rewrite you probably want `break` since `last` restart
> location matching process
>
That did the trick :)! The `break` was the part I was not doing right.
Thanks @nanaya!!
Posted at Nginx Forum:
https://for
On Wed, Nov 4, 2015, at 05:27 AM, kodeninja wrote:
> Howdy, everyone!
>
> I'm trying to figure out if there's a way to achieve this with nginx:
> <http://stackoverflow.com/questions/33427101/nginx-rewrite-url-without-causing-redirect-and-proxy-to-backend-app>.
>
Howdy, everyone!
I'm trying to figure out if there's a way to achieve this with nginx:
<http://stackoverflow.com/questions/33427101/nginx-rewrite-url-without-causing-redirect-and-proxy-to-backend-app>.
I didn't get response on the SO question yet, so trying my luck here :).
Yes that's what I understood after few tests. I will add the expire by the
PHP script.
Thanks for all the help!
Karl
On Tue, Mar 17, 2015 at 3:07 PM, Nurahmadie Nurahmadie wrote:
>
> On Wed, Mar 18, 2015 at 3:46 AM, Karl Johnson
> wrote:
>
>> Thanks for the reply Nurahmadie.
>>
>> I changed t
On Wed, Mar 18, 2015 at 3:46 AM, Karl Johnson
wrote:
> Thanks for the reply Nurahmadie.
>
> I changed the location to ~ ^/static/ and the rewrite works again. I've
> added a "expires 1w;" in this location to add an expire on all images in
> /static but it doesn't seem to apply, images give 200 OK
Thanks for the reply Nurahmadie.
I changed the location to ~ ^/static/ and the rewrite works again. I've
added a "expires 1w;" in this location to add an expire on all images in
/static but it doesn't seem to apply, images give 200 OK and never cache.
Is it the right way to do it?
location ~ ^/st
That's because the latter regex location takes precedence over the /static
one.
You should first decide if that regex location should also includes /static
prefix or not.
If it's a yes, then you should also add the same rewrite-rule inside your
regex location, if it's a not, you can turn your /stat
Hello,
I host a website based on Laravel with Nginx 1.6.2 + PHP-FPM 5.6. Most
images on the website are in /static folder and are served to visitors with
a PHP file (see /static location).
I want to add a 30 days expire on all images of this vhost. However, when I
add the "location ~* \.(?:image)
On Thu, Feb 05, 2015 at 12:16:27PM -0500, ntamblyn wrote:
Hi there,
> How can i turn this into a rewrite i have include what i have tried
"rewrite" matches a request uri, the same as "location" does. This does
not include the query string.
> I have tried
>
> rewrite /test/c_(.*)\?change_lang
Why did you escape the question mark?
---
*B. R.*
On Thu, Feb 5, 2015 at 6:16 PM, ntamblyn wrote:
> How can i turn this into a rewrite i have include what i have tried
>
> for example you have www.example.com/test/c_index.shtml
>
> you click a the change language button and the url changes to
>
How can i turn this into a rewrite i have include what i have tried
for example you have www.example.com/test/c_index.shtml
you click a the change language button and the url changes to
www.example/com/test/c_index.shtml?change_lang
so i would like to rewrite that to www.example.com/test/e_ind
Hi Francis,
Thank you for the suggestions. I will try them and revert.
Regards,
Joyce Babu
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
On Wed, Nov 26, 2014 at 05:35:06PM +0530, Joyce Babu wrote:
Hi there,
> I am trying to move a site with a large number (93) of .htaccess files from
> Apache to Nginx.
There isn't always a 1:1 correspondence between apache and nginx config,
so some things will differ.
The suggestions below do do
I am getting a new dedicated server and need to decide between Nginx and
Apache Event MPM. I have received expert advice to use Nginx, but unless I
have a solution to this problem I am unable to move to Nginx. I have been
trying to solve this for the past 3 days. I have been checking the Nginx
debu
Hi everyone,
I am trying to move a site with a large number (93) of .htaccess files from
Apache to Nginx.
There are over 800 rewrite rules to convert. To optimize performance, I
have decided to
place the rules under separate nested location blocks (61 blocks in total).
But I am having problem wit
Hi,
>> I'm working on a default server_name that match everything but www.domain.tld
>> then rewrite to www.domain.tld.
>
> It sounds like you may have better luck letting other server{} blocks use
> expected server_name:s; and just let the default match everything else.
>
> But I'm not exactly
On Mon, Nov 17, 2014 at 02:22:48PM +0100, Yoann Moulin wrote:
Hi there,
> I'm working on a default server_name that match everything but www.domain.tld
> then rewrite to www.domain.tld.
It sounds like you may have better luck letting other server{} blocks use
expected server_name:s; and just let
Hello,
I'm working on a default server_name that match everything but www.domain.tld
then rewrite to www.domain.tld. I use nginx 1.2.1-2.2+wheezy3 with a big regexp.
I have an issu with tld that contain a dot (co.uk co.au net.au, etc...).
I must be able to make a difference between domain.co.uk
J, It's not a misconfigured device, that is how fortinet does it's
webportal vpn access to internal websites. Talked to fortinet, that's how
it works. Francis, I will look at that. Thanks for your help!
On Fri, May 30, 2014 at 12:59 PM, Francis Daly wrote:
> On Fri, May 30, 2014 at 11:55:32A
On Fri, May 30, 2014 at 11:55:32AM -0400, bwellsnc wrote:
Hi there,
> This is the issue. I am using a fortigate device to protect my network and
> I want to use the https connection in the web portal to access my Jira
> instance. The problem is that jira always expects a
> https://jira.internal
On 30 May 2014 16:55, bwellsnc wrote:
> Hello everyone, I have an interesting issue. I am using nginx 1.6.0 to
> proxy back to my Jira instance. This is working great within my network.
> This is the issue. I am using a fortigate device to protect my network and
> I want to use the https connec
Hello everyone, I have an interesting issue. I am using nginx 1.6.0 to
proxy back to my Jira instance. This is working great within my network.
This is the issue. I am using a fortigate device to protect my network and
I want to use the https connection in the web portal to access my Jira
instan
Hi,
> Simple answer is:
>
> Because rewrite directive is to rewrite request URI as per it's name,
> while redirecting a request to a named location preserves request
> URI (and that's the sole purpose of named locations).
>
> More complex one is:
>
> Support of named locations in rewrites was
On Tuesday 18 March 2014 22:52:06 yzprofile wrote:
> Hi,
>
> I have a simple question:
>
> Why doesn't Nginx rewrite directive support '@' named_location?
>
> : )
The "rewrite" directive is intended to change request URI, while
the named loca
Hello!
On Tue, Mar 18, 2014 at 10:52:06PM +0800, yzprofile wrote:
> Hi,
>
> I have a simple question:
>
> Why doesn't Nginx rewrite directive support '@' named_location?
Simple answer is:
Because rewrite directive is to rewrite request URI as per it's na
Hi,
I have a simple question:
Why doesn't Nginx rewrite directive support '@' named_location?
: )
Thanks
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Fixed. $live_site in joomlas config was empty, apache ignores that,
nginx not
Kind Regards
Simon
Am 2014-02-04 12:49, schrieb mailinglis...@simonhoenscheid.de:
Hello List,
I did a testmigration of a Joomla CMS yesterday, and there is a bug
(the system was running on Apache before):
There wher
Hello List,
I did a testmigration of a Joomla CMS yesterday, and there is a bug (the
system was running on Apache before):
There where no Apache rewrite rules on the old server.
The Joomla Uses SEF (Search Engine Friendly URLs)
OLD:
http://www.example.com/pattern/article.html
NEW:
http://ww
hi! i'm newbie so having a hard time!
I have a question about rewrite configure in nginx!
RULE is http://URL/[option]/http://URL .
I mean...
for example,
if request is http://aaa.net/25X25/http://bbb.net/ccc.jpg ,
rewrite is /25X25/bbb.net.jpg
should i use regular expression?
please help me!
On 06/23/2013 02:14 PM, escavern wrote:
Dear nginx forum members, im buying the script and it has only apache
rules(htaccess) and i have difficulties convert the htaccess to nginx
rewrite rules...
Have you tried it? See:
Você já tentou isso? Veja:
http://winginx.com/htaccess
<h
Dear nginx forum members, im buying the script and it has only apache
rules(htaccess) and i have difficulties convert the htaccess to nginx
rewrite rules, the file is:
=
RewriteEngine On
RewriteBase /
RewriteRule ^login
I don't believe you need to escape your backslashes like you're doing,
though I'm not sure that's you actual problem.
It would help if you gave some more detail about what "not working"
looks like. How are you testing? What do you see? Etc etc.
Cheers,
Jonathan
--
Jonathan Matthews // Oxford, Lon
Hi All,
I have a problem in convert Lighttpd rules to Nginx rewrite
This is my Lighttpd rules
"^/pthumb/([^\/]+)\/(.+)$" => "/pthumb/index.php?$1&f=$2"
And this is Nginx Rewrite converted from above Lighttpd rules
rewrite ^/pthumb/([^\/]+)\/(.+)$ /pthumb/index.php?
I need help with phpBB rewrite rules. Used this tool
http://winginx.ru/htaccess to convert some rules, but they are not applied.
The syntax is ok, so i don't know the problem. Original .htaccess -
[code]
# Lines That should already be in your .htacess
Order Allow,Deny
Deny from All
Order Allow,
46 matches
Mail list logo