(Solved) Re: proxy_pass and path with period

2019-03-20 Thread angelochen960
302 is redirect Posted at Nginx Forum: https://forum.nginx.org/read.php?2,283439,283445#msg-283445 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

proxy_pass and path with period

2019-03-20 Thread angelochen960
Hi, I use proxy_pass to forward everything to a backend: location / { client_max_body_size 4M; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy

Re: adding expires but not show up in headers (SOLVED)

2013-06-19 Thread angelochen960
You are right, thanks to Francis too for giving me the right direction to look for the problem, it's really the other location that should have the expires set as well, thanks. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240201,240208#msg-240208 _

Re: adding expires but not show up in headers

2013-06-19 Thread angelochen960
there is one before that: location ~ "^(/images/)(\d{1})/(\d{2})/(.*\.jpg$)" { } Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240201,240206#msg-240206 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: adding expires but not show up in headers

2013-06-19 Thread angelochen960
there is another one, but more specific, but it comes before location ~ ^/images/: location ~ "^(/images/)(\d{1})/(\d{2})/(.*\.jpg$)" { } Posted at Nginx Forum: http://forum.nginx.org/read.php?2,240201,240205#msg-240205 ___ nginx mailing list nginx@ng

adding expires but not show up in headers

2013-06-18 Thread angelochen960
Hi, I added a expires as follow: location ~ ^/images/ { root /var/www expires max; } if I do a curl -I http://localhost/images/sample.jpg, I got following headers, but can not find the "Expires" in the headers, what I did wrong here? Thanks. HTTP/1.1 200 OK Server: nginx/1.4.1 D

Re: using a proxied server as default_server

2013-05-31 Thread angelochen960
Hi Francis, I think that's a good approach, will give that a try, thanks, Angelo Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239707,239726#msg-239726 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: using a proxied server as default_server

2013-05-31 Thread angelochen960
Hi, Sorry for not making it more specific, the issue is, the app in the tomcat is a virtual host as well, so it checks 'host' field for 'sample.com', a default_server with specific IP when accessed by a IP address like http://192.168.1.1/, it will not have a 'host', thus when passed to the app in

using a proxied server as default_server

2013-05-30 Thread angelochen960
Hi, I have a tomcat app running behind nginx, it works, now I make it the default_server, this works if it access with server name like sample.com, but if access with an IP, http://192.168.1.1, it does not work, any idea ? Thanks, server { listen 192.168.1.1:80 default_server; se

Re: newbie needs help

2013-05-30 Thread angelochen960
that works, thanks. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239683,239699#msg-239699 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: newbie needs help

2013-05-30 Thread angelochen960
Thanks for the reply, it works, and also I read again those references. a related issue, say: if somebody enter this url in the browser: http://sample.com/not_exist_url and I'd like to redirect it to http://sample.com/ with the try_files approach, index.html got displayed, that's right, but th

newbie needs help

2013-05-30 Thread angelochen960
Hi, new in ths nginx, with following config, I want to achieve: http://sample.com/ render index.html http://sample.com/test, or anything after '/' path, render index.html server { listen 80; server_name sample.com ; root /var/www/sample/public_html; location / {