302 is redirectby angelochen960 - Nginx Mailing List - English
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_pass http://local_app:8080; proxy_redirect off; } this works: /admin/utilby angelochen960 - Nginx Mailing List - English
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.by angelochen960 - Nginx Mailing List - English
there is one before that: location ~ "^(/images/)(\d{1})/(\d{2})/(.*\.jpg$)" { }by angelochen960 - Nginx Mailing List - English
there is another one, but more specific, but it comes before location ~ ^/images/: location ~ "^(/images/)(\d{1})/(\d{2})/(.*\.jpg$)" { }by angelochen960 - Nginx Mailing List - English
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 Date: Wed, 19 Jun 2013 03:52:13 GMT Content-Type: image/jpeg Content-Length:by angelochen960 - Nginx Mailing List - English
Hi Francis, I think that's a good approach, will give that a try, thanks, Angeloby angelochen960 - Nginx Mailing List - English
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 the tomcat, it will not hit the right virtual host there, initially I was thinking, probably nginxby angelochen960 - Nginx Mailing List - English
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; server_name sample.com root /var/www/public_html; location / { proxy_set_header Xby angelochen960 - Nginx Mailing List - English
that works, thanks.by angelochen960 - Nginx Mailing List - English
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 the url in browser still remain as http://sample.com/not_exist_url, i'm looking for a 302 i belby angelochen960 - Nginx Mailing List - English
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 / { index index.html index.htm; } location ~ ^/.* { index index.htmby angelochen960 - Nginx Mailing List - English
hi, this will catch / location / { index index.html index.htm; } I'd like to catch all, like /asdf, /asdfasdf/asdfasdf, in short, any url will always map into '/', how to do this? thanks,by angelochen960 - How to...