You may need to either set a proxy_pass or a root directive so nginx knows what to do with the rewritten urls. Right now you most likely get a 404 e.g. add location / { root /var/www/yourdocroot/; } into your server blockby mfeldheim - How to...
Is nginx proxying to another webserver maybe? Or another server proxying to nginx?by mfeldheim - How to...
To return a "503 temporarily not available, server in maintenance mode, dont worry we are coming back ;) " - page you can simply do: location / { return 503; break; root www; index index.php; } You probably want to have the 503 without a change in your configuration by simply moving a 503.html into your doc root.. in the try_files documentation they have an example for tby mfeldheim - How to...
/usr/local/nginx is the default document root set by nginx ( via ./configure ) you need to set the document root using the root directive. Here you can read more about it http://wiki.nginx.org/HttpCoreModule#rootby mfeldheim - How to...
I think you cannot nest the if directive. following would work ( by syntax, didnt check the regex and variables ) if (!-d $document_root$request_filename) { rewrite ^/([^/]+)/([^/]+)\//?$ $document_root/data.php?type=$1&data=$2 last; } if (!-f $document_root$request_filename) { rewrite ^/([^/]+)/([^/]+)\//?$ $document_root/data.php?type=$1&data=$2 last; } I'd say you wont neeby mfeldheim - How to...
Try the following in a server {} block proxy_cache_path /data/nginx/cache/one levels=1:2 keys_zone=myCache:10m; # this directive is inherited, you can also set it in the location part if you want to cache into different paths per location proxy_cache myCache; location ~ ^/cached_documents_regex\.html$ { # cache this document for 48h when it returns a HTTP 200by mfeldheim - How to...
We are running nginx 0.8.54 as a http proxy with cache enabled for a couple of php-generated html documents. Lately we had difficulties with available harddisk space on the buffer / cache harddisk - increasing it's size from 8 to 20GB helped only temporarily. Is there a way to estimate the maximum amount of space nginx could allocate when running and to ensure by configuration that nginx willby mfeldheim - How to...
a servername listen 192.168.3.11:80; server_name www.de.nginx.tebra.loc; matches request www.de.nginx.tebra.loc ( 192.168.3.11:80 ) de.nginx.tebra.loc ( 192.168.3.11:80 ) but also www.at.nginx.tebra.loc ( 192.168.3.11:80 ) even when I have another server{} section with at.nginx.tebra.loc, same listen, defined. Not good - any way to force the serveby mfeldheim - How to...
I want to cache the whole website, once a site changes I want to expire its cache e.g. via HTTP request from one of the backends. How do I set up nginx to have a cache with unlimited TTL, how would I expire single cache items when the content needs to be updated? Thx in advance.by mfeldheim - How to...
Thank you, this is working excellent.. I've set the proxy_cache_valid to 10m to soften the I/O overhead.. still - would be cool if I could set the cache TTL to a way higher value and bypass the caching completely while the backend servers return valid codes. When backends fail and I have to deliver from cache, additionally I'd like to send a header "304 Not modified" ( does that makby mfeldheim - Nginx Mailing List - English
Any ideas? Could proxy_store ( http://wiki.nginx.org/NginxHttpProxyModule#proxy_store ) help me in that case?by mfeldheim - Nginx Mailing List - English
So far I am using Nginx as loadbalancer only. Since we have a huge amounts of ( frequently changing ) pages, and a small hitrate per unique page, output caching has never been really interesting. I have a failover app server in my upstream configuration for the case one of the active servers fails. Now if all app servers would fail - e.g. the database backend has a problem etc. app-server failby mfeldheim - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
|