Welcome! Log In Create A New Profile

Advanced

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly
October 30, 2012 03:50PM
On Tue, Oct 30, 2012 at 07:33:14AM -0400, hristoc wrote:

Hi there,

> I get real html from internal server with curl and is exact what I expect.

So: when you do "curl -0 -i http://192.168.1.1/" from the nginx server,
you get the same content as when you do "curl -i http://public-ip/admin"
from somewhere on the internet?

That suggests that the proxy_pass is working.

> For example if I try to access direct js file over the
> web like: http://www.mydomain1.com/server1/js/jsquery.js I get error 404
> file not found. I think nginx does not forward this request to internal
> serve and trying to find the js file on local directory.
>
> How to resolve this issue ?

What is your nginx configuration?

In particular: what "location" blocks do you have?

http://nginx.org/r/location for details. My guess is that you have
something like "location ~ js" as well as "location /admin", and nginx
chooses that location block for this request.

If that is true, then possibly using "^~" will work for you.

Good luck with it,

f
--
Francis Daly francis@daoine.org

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

Rewrite or proxy_pass to internal ip ?

hristoc October 29, 2012 04:03AM

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly October 29, 2012 05:52AM

Re: Rewrite or proxy_pass to internal ip ?

hristoc October 29, 2012 06:43AM

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly October 29, 2012 05:06PM

Re: Rewrite or proxy_pass to internal ip ?

hristoc October 30, 2012 04:51AM

Re: Rewrite or proxy_pass to internal ip ?

Francis Daly October 30, 2012 03:50PM

Re: Rewrite or proxy_pass to internal ip ?

hristoc October 31, 2012 05:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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