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

1
vote
1answer
238 views

Phpmyadmin cant seem to read config

I'm in the process of setting up a LEMP (Linux, Nginx, MySQL, PHP) server with phpMyAdmin. I installed and followed the various instructions including the create_tables script they provide etc (I've ...
2
votes
1answer
677 views

CakePHP and Wordpress on Nginx PHP-FPM

I'm trying to configure both CakePHP and a wordpress blog on the same server. CakePHP here: http://site.com/ Wordpress blog here: http://site.com/blog/ What works: The whole CakePHP app and going ...
12
votes
1answer
10k views

nginx - client request body is buffered to a temporary file

I get the following error in my log files every time I try to upload a large file. a client request body is buffered to a temporary file /var/lib/nginx/body/0000000001 Although the file uploads ...
4
votes
2answers
849 views

Do multiple Nginx servers load balance the same IP address to the same backend with the ip_hash directive?

I have two separate Nginx machines. The domain uses round-robin DNS and has two A records, one for each of the two frontend Nginx server. Both Nginx servers use the ip_hash directive and proxy ...
1
vote
1answer
165 views

What is the proper way to watch and reload Nginx conf?

I have two questions: Is there a difference between: nginx -s reload and pkill -HUP -F nginx.pid What is the proper way to watch the Nginx conf file and upon changes test the conf file (nginx -t), ...
4
votes
1answer
3k views

Test if nginx variable is set

I need to set a variable to a default value if it is not already set. Following config does the job: if ($foo ~ "^$") { set $foo default-value; } But it generates runtime warnings: using ...
3
votes
1answer
697 views

Nginx webdav is not showing files/folders with special chars

I have Nginx with WebDAV module working and everything is right, except the files or the folders that contains any square brackets ] or [. That files/folder are never showed in the list. I never had ...
1
vote
0answers
65 views

NGINX Benchmark

I had set up nginx, php-fpm and mysql as web server. Now I am testing the server that I've configured using ab (Apache Benchmark) I use this command : ab -kc 100 -n 100 http://myserver/index.php but ...
1
vote
1answer
500 views

Nginx and If-Modified-Since/If-None-Match headers

Anyone know how to rewrite this apache rule for Nginx? RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}] RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}] Thanks
3
votes
0answers
1k views

Why does Nginx's proxy_intercept_errors directive require a rewrite to work properly?

Following is a sample Nginx server configuration. Without the "magical talisman" location block, proxied error content results in an Nginx 404 page rather than the customized error page being served. ...
2
votes
4answers
2k views

Can't configure nginx for multiple domains

I'm trying to host multiple domains (with simple static pages) on a single VPS, running Ubuntu 12.04 LTS, nginx. The basic nginx configs for all domains are similar to this one (all separated in ...
3
votes
2answers
803 views

Configuring nginx as tomcat / uWSGI proxy

i'm in the process of configuring an amazon EC2 machine for java and django development. The stack we've chosen is nginx as the top level listener on :80 port, and passing the requests to the ...
2
votes
1answer
3k views

Nginx - Forward HTTP AUTH - User?

I have some trouble with Nginx and Jenkins (Hudson). Iam trying to use Nginx as Reverse Proxy for the Jenkins instance with HTTP Basic Authentication. It works so far, but i have no idea how to pass ...
2
votes
1answer
192 views

Using nginx: require authentication when request from public IP, not needed when local

I wrote a simple file browser app which is served using node on port 3000. I use nginx as a front-end which proxies this service. This is on my home server. I would like to be able to require basic ...
3
votes
1answer
294 views

How do I lock down nginx on debian wheezy (running systemd)?

The systemd unit file that comes with the nginx-common package runs the master process as root, which makes me nervous. I assume the only reason it runs as root is to bind port 80, but being root is ...
2
votes
2answers
1k views

Nginx local fallback error page if proxy destination is unavailable

I'm forwarding requests to a local service through a Nginx server. What I try now to accomplish is to fallback to a local error page in case the service becomes unavailable. My current configuration ...
2
votes
1answer
227 views

CGI permissions with NGINX & FastCGI

I'm running GitWeb (which is essentially a CGI script) on a server which also runs GitLab. My aim is to provide reaad-only access to GitLab repositories without registering people. I've pointed ...
0
votes
1answer
513 views

Why does amazon ec2 have downtime after deploy when other identical servers do not?

This has puzzled me for the past few months...I'm admittedly new to server administration and I took a stab running a production rails app over at EC2. While I've learned a lot and feel pretty ...
2
votes
0answers
72 views

Is it possible to dynamically set the upload_store value for nginx upload modue?

I have a lot of hard drives in my server and I want to upload files to them. Since it is overhead to upload a file to one drive and then move it to another, I would like to directly upload the file to ...
0
votes
1answer
160 views

nginx proxy redirecting request to different proxy

I have three LXC containers (CN1, CN2, CN3). They each run their own Apache instance and have their own networking, so each container has their own private IP. I set up all containers to listen on ...
0
votes
1answer
425 views

Nginx proxy pass php index problems

I am having slight issues making my indexes work with nginx serving static content and passing php to apache on a different server. Basically if I need it to try index.php on the backend apache ...
0
votes
3answers
1k views

Nginx yum update checksum error on CentOS5 for CentOS6 package

I'm getting checksum error when doing Yum update due to Yum looking for Nginx package from CentOS 6 repo (I'm using Centos 5.6). Below is the error: ...
0
votes
1answer
153 views

install nginx on centos 6 but folders isnot working give me 404 not found

I've install Nginx on CentOS 6 without control panel following these steps. I got Nginx installed successfully, see this link. But I still have a folder that isn't showing and giving me "not found ...
0
votes
1answer
94 views

Change root of server block in nginx?

I moved to a cheaper VPS host in which my prior config was set up to display my files from /home/sam/www/website/index.html But I can't seem to get this to happen on the new server, the default ...
1
vote
1answer
378 views

How to tell php-fpm to send php error log to the nginx error log?

When I am using apache/mod_php, the PHP error will appear in the apache's error log. Now, I am using php-fpm with nginx via fcgi, is it possible to have the PHP error log in the nginx error log as ...
0
votes
2answers
118 views

Why is this nginx rewrite apparently duplicating pre-existing configuration?

I am new to nginx, I have read some of the documentation at wiki.nginx.org, as long as I know the try_files sentence will do exactly as it says, it will search a file in the order given, as I see this ...
2
votes
1answer
352 views

nginx wrong IP when checking connections limit

I have lot of times the following line appearing in the nginx error log. This is causing the 50x error appearing to the visitors of the site. We have a multilanguage site that has URL ...
1
vote
1answer
528 views

Show a 404 for not-found subdomains instead of showing root domain's content

I'm using nginx. What I'm trying to achieve: A root domain domain.com which gets contents from /var/www/domain.com A subdomain sub.domain.com which gets contents from /var/www/sub.domain.com Any ...
0
votes
1answer
79 views

Deny access with https for some unsecured domains on nginx [duplicate]

I have nginx web server with virtual hosts on one IP address. Some domains working with http: ex1.com, ex2.com, ex3.com, and one domain with https: se1.com. When I try to use httpS on ex1.com, ex2 or ...
0
votes
0answers
129 views

nginx hotlink protection on Centos 6

I want to configure my nginx to forbid images hotlinking to other websites. Or better said I want to link image from imgur with some message instead of someone using my badwidth. This is the code I've ...
0
votes
1answer
174 views

nginx simply refuses already defined IP address on catch-all directive

I have this catch-all: server { listen 80 default_server; server_name _; return 444; } Now, Let' s say we have two IPs called 1.2.3.4 and 1.2.3.5. Well, Let' s say ...
4
votes
3answers
1k views

Creating a fallback error page for nginx when root directory does not exist

I have set up an any-domain config on my nginx server - to reduce the amount of work needed when I open a new site/domain. This config allows me to simply create a folder in /usr/share/nginx/sites/ ...
2
votes
2answers
3k views

Nginx on Windows with ASP.NET and the Microsoft .NET framework?

Question: Is it possible to use nginx on Windows to serve ASP.NET / ASP.NET MVC pages using the Microsoft .NET framework ? I know one can do it with mono-fastcgi, but I was wondering if it is ...
0
votes
2answers
131 views

Setting up Nginx and uWSGI on different servers

I've done before many setups of both uWSGI for django applications and flask for python-plugin under ubuntu along with Nginx as web server. I've always done it in one box.. As now, we are having a ...
0
votes
2answers
85 views

How to serve multiple locations from a single root?

I'm having nginx serve static files that map from uri paths to folder paths like: www.tempuri.org/js <=> /var/www/plublic/js www.tempuri.org/css <=> /var/www/plublic/css ...
0
votes
2answers
154 views

How does lighttpd/nginx determine filetype of a file? (which method?)

I want to configure my lighttpd to serve some static files, with compression capability. The files are plain text but they have .bin extension. I have these lines in my lighttpd configuration: ...
0
votes
1answer
42 views

Nginx: set subdomain as part of 404 page address

I have a multi language site which have sub domains for every language. I want to use the sub domain as part the name of my custom static error page. Example error_page 404 ...
1
vote
0answers
250 views

PHP SSI with NGINX

I've got a really old website I'd like try running on NGINX instead of Apache. This site consists of many flat HTML files with sporadic PHP SSIs, such as: <!--#include virtual="/some_file.php" ...
1
vote
0answers
171 views

How can I serve up HTML and JSON with nginx during “maintenance mode”?

I've got an nginx config for a PHP web app and I would like to make it serve an additional purpose, and I can't seem to find a way to accomplish it. My current nginx config does the following: ...
0
votes
1answer
1k views

Can we jump to another location from a location in nginx? [closed]

I am trying to achieve something like this: location /location1/{ if ($arg_api_key = a_valid_api_key) { proxy_pass http://localhost:8080; } # else jump to location2 } location ...
0
votes
1answer
2k views

Extracting matches in NGiNX with regex without if block

With NGiNX I get a string that contains information that I can extract content with regex. But the only way I found that I could do this, is with if block. Is there any another way? The extracted ...
1
vote
2answers
327 views

How to send mail by primary IP?

In a Debian server, I added a second IP by the following configuration in /etc/network/interfaces # The primary network interface allow-hotplug eth0 iface eth0 inet static address 1.1.1.1 ...
0
votes
1answer
3k views

NGINX + Codeigniter doesnt work can't access controllers and send parameters to controllers

I want to run codeigniter under NGINX but it just doesnt work. I want to be able to send a parameters to controllers methods. But so far I can not even access controller using the address ...
0
votes
1answer
89 views

Treat different static files with nginx in a concrete directory

I'm building an application where some files will be served by the app itself. I'm not good on configuring server side things, so my nginx configuration looks like this: location ~* ...
0
votes
1answer
1k views

Can't get Codeigniter URLs working on Nginx [duplicate]

After successfully setting up nginx on my windows, another problem where I am stuck. Though, everything works as usual. I am able to access pages and PHP works fine but problem comes when I try to use ...
0
votes
2answers
63 views

Can't set up nginx but my config file seems alright

I have a server at 176.227.213.2. So I created a conf file for the default server (default.conf) server { listen 80; server_name default 176.227.213.2; location / { root ...
0
votes
1answer
2k views

nginx not logging any error, no starting

After trying to duplicate a nginx to another, I worry about nginx not starting. nginx -t says that the config syntax is ok. In nginx.conf it's told to log errors: error_log /var/log/nginx/error.log; ...
0
votes
2answers
661 views

Can't get php-fpm with Nginx to work

Server: CentOs x86_64 /etc/php-fpm.d/webuser1.conf [webuser1] listen = 127.0.0.1:9001 listen.allowed_clients = 127.0.0.1 user = webuser1 group = webuser1 pm = dynamic pm.max_children = 15 ...
0
votes
1answer
555 views

Zend Framework won't work for URLs with trailing slash — how to configure nginx to rewrite URLs properly?

I am setting up an nginx server to be used with the Zend Framework. For the most part it works. However, if there is a trailing slash on the end of a URL, for example http://localhost/test/ vs ...
2
votes
2answers
75 views

nGinx Redirecting to https:// on all URL

I am trying to get the following to work so that no matter what you type in the URL bar you always go to "https://www.". So far www. does not go to https://www. and https:// does not go to ...