nginx (pronounced "engine-x") is a lightweight, high-performance Web server and reverse proxy as well as IMAP/POP3 proxy server.

learn more… | top users | synonyms

0
votes
1answer
17 views

Restricting multiple directories to same IP ranges

Suppose I have the following in an nginx configuration file: location ^~ /foo/ { allow 1.2.3.4; allow 5.6.7.8; allow 9.10.11.12; … allow 99.100.101.102; deny all; # rest ...
0
votes
0answers
6 views

nginx and expire header not working

this is my nginx config location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 1y; add_header Pragma public; add_header Cache-Control "public"; try_files $uri $uri/ /$1/$2 =404; ...
0
votes
0answers
12 views

Wordpress PHP half works on nginx

under the path there are public files: $/usr/share/nginx/html 50x.html readme.html wp-content wp-mail.php apc.php wp-activate.php wp-cron.php wp-settings.php ...
1
vote
0answers
14 views

nginx add_header is not working

I'm using nginx-1.7.0 on windows 7. I am trying to use add_header to get to a json file I have residing in /data/TESTFOLDER. This is what my location block looks like: location ...
0
votes
0answers
6 views

Increase PHP-FPM's max upload/post size

I'm running php5-fpm under Nginx on Ubuntu 14.04. I want to increase the max upload size. I have edited my /etc/php5/fpm/php.ini to have the following lines defined as below: upload_max_filesize = ...
0
votes
1answer
21 views

Reverse-proxied nginx exposing port number when redirecting directory index requests

I have nginx backend that's used to serve static files. Nginx is running on a non-standard port (e.g. 8080). It is publicly accessible via a reverse proxy on port 80. The setup works fine for the ...
0
votes
1answer
27 views
+100

Update Cache-Control max-age when srcache returns response from cache

I have configured Nginx to use srcache (along with the redis and redis2 modules). Server-side caching works great. My application responds with the appropriate Expires and Cache-Control headers, and ...
0
votes
0answers
12 views

In NGiNX my try_files is trying to get a php file in the wrong place

Here is a sample of my configs: root /usr/local/html/website/public/; location ~* auth/v1/* { try_files /auth.php?$args $uri/; } # location = /auth {return 301 ...
3
votes
2answers
954 views

Nginx index.php forbidden sub-directory only!

I'm using nginx 1.0.4 + php-fpm + wordpress on OpenVZ Container. my setup works fine. but when i try access to http://example.com/wp-admin/ it give me 403 error and I access ...
0
votes
2answers
818 views

504 error in nginx +php-fpm : post request

I have a test server with nginx and php-fpm. Pages on the site are opening correctly, but when I want send POST request for example an "authorize on site" I get "504 Gateway Time-out error". Nginx ...
0
votes
0answers
21 views

Nginx error: “File not found”…coming from someone else's domain

I set up nginx to serve from an Ubuntu EC2 instance a few days ago, and today I checked the error logs when I encountered 504 after 504 in the browser. I found the following in my error.log: ... ...
1
vote
2answers
72 views

Nginx, proxy_pass, mangled relative links upstream

I'm having a problem with nginx proxy_pass and have pored over the HttpProxyModule documentation at the nginx wiki, but can't figure it out. I have Supervisor (http://supervisord.org/) running on a ...
0
votes
2answers
641 views

NGINX location clause for only root domain

How do I only redirect too sub1.example.com when hitting $request_filename ~ /sub1 on example.com. For example if I'm on sub1.example.com, hitting /sub1 wont redirect me back too sub1.example.com but ...
0
votes
5answers
2k views

nginx: php-fastcgi running but php files not executing

I have recently set up a nginx server with PHP running as FastCGI process. The server is running with HTML files however PHP files are downloading instead of displaying and PHP code is not processed. ...
0
votes
0answers
9 views

Nginx/PHP-FPM: Returning 404s for CSS and JS

I can't access PHP files placed in sub-directories and my CSS/JS files return a 404 in browser. Yes, I have seen many others experiencing a 404 issue but their fixes don't seem to be my solution. I've ...
-1
votes
0answers
12 views

pagespeed on apache with nginx as reverse proxy

I have a VPS and using the following stack: NGINX as front-end proxy on port 80. Also port 443 for SSL Apache on 8080 for dynamic content (mostly PHP) Now, I want to use PageSpeed module by Google. ...
4
votes
3answers
6k views

How to install nginx and install the configuration files too

I've just completely uninstalled nginx 1.0.6 from my server (Ubuntu 11.04) using apt-get remove nginx rm -rf /etc/nginx/ rm -rf /usr/sbin/nginx rm /usr/share/man/man1/nginx.1.gz apt-get remove ...
0
votes
2answers
136 views

Nginx PHP-fpm permission

When i'm setting the user in nginx.conf to root root: user root root; then my website is working, but when i set it to nginx nginx i get error in the logs: connect() to ...
2
votes
1answer
15 views

Nginx throws 404 only on php scripts using php-fpm

I've installed a testing server using nginx + php-fpm. I've tried all of the following: Nginx + Php5-fpm not rendering php files nginx + php fpm -> 404 php pages - file not found When accessing ...
1
vote
1answer
1k views

An upstream response is buffered to a temporary file

I have a rather large and slow (complex data, complex frontend) web application build in RoR and served by Puma with nginx as reverse proxy. Looking at the nginx error log I see quite a few entries ...
-1
votes
0answers
35 views

Reduce Nginx's response times

I'm running a VPS with 1GB with Debian 7. Nginx's response time for static HTML files are around 300-500ms, which seems relatively high, because other static files (CSS/JS) are served in 75-125ms. Is ...
1
vote
0answers
13 views

Turn on/off proxy pass in nginx if a particular header is set

For testing purposes (in particular I'm developing a performance analyzer for a website that currently runs in production) I need to have some endpoints (es: /performance) that should be processed by ...
0
votes
1answer
730 views

Nginx : Proper use of limit_req_zone and limit_req

I have 2 website running on VPS. Their purpose is sharing music files and publishing news. Both of them use wordpress. What I am trying is that I want to prevent little hackers from flooding the ...
-1
votes
0answers
16 views

nginx rewrite : How to return 404 if a specific query string on a specific url was not found?

As far as i know there is no IF NOT statement for nginx, So how i implement this situation when i have a URL like : http://www.my_domain.com/the-folder/?ID=value When there is a request to : ...
0
votes
1answer
24 views

browser downloads site page on nginx server

I have a wordpress copy on nginx on my localhost. when I wants to open it with browser, the browser just downloads a php file and does not open the site. my /etc/nginx/nginx.conf file cotains: user ...
-1
votes
0answers
18 views

Is there a way to recover lost logs in Nginx? [duplicate]

I have a fedora based server with nginx installed on it. I was taking logs and using logrotate, rotating them on a daily basis. Here's the configuration /etc/logrotate.d/nginx: /var/log/nginx/*log { ...
0
votes
0answers
21 views

Using regex with several locations in nginx

I have dynamic number subfolders of the domain. For example: http://mysite/en/ http://mysite/en-us/ http://mysite/de/ http://mysite/ru/ In general, subfolders look like "en","de","ru" OR "en-us", ...
0
votes
1answer
16 views

How to redirect nginx to tornado backend running https

I have nginx running as my main web server but I also have a tornado server running https at 127.0.0.1:8888 (same machine as the nginx server). I would like to redirect traffic to my tornado server ...
1
vote
2answers
3k views

Optimize php-fpm and varnish for a powerfull server

My setup is: Intel® Core™ i7-2600 and RAM 16 GB DDR3 RAM varnish+nginx+php-fpm+apc for a not very heavy WordPress blog with W3 Total Cache and CDN My problem is that after 55 hits per second ...
1
vote
2answers
27 views

Wordpress non-www to www redirect loop in NginX

I deployed my wordpress website on NginX successfully. I need permalinks to be http://www.mydomain.com/%postname% and blog to be http://blog.mydomain.com/%postname%. It redirects all www traffic to ...
0
votes
1answer
688 views

User http does not have write permissions directory?

I have a bit of an odd set up, I think. I have groups for each domain my server hosts, and I add the user http to each domain group along with the users that should have access to the groups' domains. ...
0
votes
2answers
2k views

ubuntu + nginx + uwsgi + django No Python application found

I am trying to setup my server with a nginx to uwsgi to django stack, but I am having problems with the uwsgi part. When I run uwsgi and pass in all the parameters on the command line, it works ...
0
votes
1answer
26 views

Nginx SSL redirect without if

In this question: rewrite http to https with ngnix behind load balancer the question is how to force SSL for nginx servers behind a loadbalancer. The problem with this setup is that the loadbalancer ...
0
votes
0answers
15 views

Route directory to root [on hold]

I have a directory /dir. My root is set to /. When the user types in mysite.com/, I want to serve up files from /dir, but keep the URL as mysite.com/. There are other folders in / which will have ...
0
votes
1answer
24 views

Nginx SSL Termination - How to encrypt data to client?

I've setup a Nginx as a HTTP load-balancer with SSL/TLS termination for apache webservers. My question is by using Nginx to terminate ssl how do I encrypt the data back to the browser/client. Does ...
0
votes
1answer
936 views

Nginx - assigning non-root location to proxy_pass

What I like to do is to proxy requests from http://example.com/proxy/foo to http://localhost:8060/foo This config proxies http://example.com/proxy/foo to http://localhost:8060/proxy/foo server { ...
1
vote
1answer
25 views

How do I use NGINX as a frontend for a Legacy (Apache) Webserver [duplicate]

I have an NGINX server setup that is already hosting two applications, and SSL is set up on that NGINX server. Now, I need to setup the NGINX server to be a front-end for a legacy Apache application ...
3
votes
1answer
829 views

Nginx dynamic upstream configuration / routing

I was experimenting with dynamic upstream configuration for nginx and cant find any good solution to implement upstream configuration from third-party source like redis or mysql. The idea behind it ...
0
votes
0answers
10 views

Nginx glob in try_files

Is it possible in nginx to do something that is the equivalent of a file path glob in try_files? server { try_files /var/www/*/assets/$uri; } That is, if /var/www/ contained site_a and site_b, ...
1
vote
3answers
1k views

Varnish 3.0.2 to Apache2 sometimes return error 503

Hey guys I hope you can help me out here. I have an Ngingx parsing http and https to a varnish cache(3.0.2). From the varnish it is sent to apache2. Now I have for some time been tracking some ...
2
votes
1answer
70 views

nginx: understanding the purpose of auth_http (IMAP proxy)

I would like to send IMAP client requests to an IMAP back-end via an nginx proxy. According to the the mail_auth_http module, a directive auth_http has to be used in order to authenticate the clients. ...
0
votes
1answer
30 views

nginx SSL termination for apache2.2 svn server results in endless redirects

I'm trying to set up a SVN repository on our new company server. We are using nginx for SSL termination and apache as SVN backend. I don't know whats wrong with my configuration, but if I call svn ...
1
vote
2answers
2k views

Nginx upload PUT and POST

I am trying to make nginx accept POST and PUT methods to upload files. I have compiled nginx_upload_module-2.2.0. I can't find any how to. I simply want to use only nginx for this, no reverse proxy, ...
1
vote
1answer
727 views

Nginx SSL redirect for one specific page only

I read and followed this question in order to configure nginx to force SSL for one page (admin.php for XenForo), and it is working well for a few of the site administrators but is not for myself. I ...
0
votes
1answer
30 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
25 views

php-fpm and nginx super fast and timeout responses together

I'm having some problem with my server: Ubuntu 12.04 nginx 1.4.6 2GB RAM OpenVZ VPS I increased php-fpm settings as the default one was very low. To something like this: pm.max_children = 48 ...
0
votes
1answer
879 views

Nginx case-insensitive reverse proxy rewrites

I'm looking to setup an nginx reverse proxy to make some upcoming server moves and load balanced implementations much easier within our apps. Since our servers are all IIS case sensitivity hasn't ...
0
votes
4answers
829 views

connections on port 80 suddenly refused / server not responding

my dedicated server stopped responding to requests on port 80 today out of sudden, i havent touched anything in more than a month. its ubuntu 10, varnish + nginx + php-fpm, only 1 website. load is ...
1
vote
1answer
30 views

nginx 404 instead of 403 for empty directory

I have the following config for my nginx server: server { listen 80 default_server; server_name example.com www.example.com; root /var/www/example.com/web; index index.php ...
0
votes
1answer
40 views

AWS: VPC and NodeJS

I'm transitioning from a dedicated server to a VPC in AWS. It's a NodeJS application baed on ExpressJS. In the current implementation, I have NGINX + Passenger in front of the NodeJS application for ...