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
6 views

upstream prematurely closed connection while reading response header from upstream

I am having issues setting up SSL for my Jenkins CI server. I use Jenkins behind nginx for a reverse proxy. I am getting these upstream prematurely closed connection while reading response header from ...
-3
votes
0answers
44 views

404 when dot in URL on nginx

When I have this in my config file, I get a 404 not found on URLs that contain a dot (.): location ~* ^.+\.(gif|ico|jpg|jpeg|png|flv|swf|pdf|mp3|mp4|xml|txt)$ { expires 30d; } For instance, if ...
1
vote
2answers
41 views

nginx as load balancer: Can it return to the client which app server the request was sent to?

The normal solution to this is to tweak the app servers themselves to send their identity back in a custom http header. We are in a special situation, in that the app server is a hard coded ...
0
votes
1answer
29 views

Nginx Reverse Proxy: servername.domain.com reverse to http://ip.add.res.s/location/App

I need a little help sorting out how to configure a reverse proxying load balancer in nginx. Basically, I have two web applications that live under subdirectories on Apache servers, /flavors/Chocolate ...
0
votes
1answer
718 views

Configuration of nginx for git-http-backend on debian(-based systems)

I'm having trouble to get git-http-backend working using an nginx server on my Ubuntu 13.04 machine. Tried it with Debian 7 before but with similar results. Basically I followed ...
0
votes
4answers
1k views

nginx more fastcgi-mono-server

I've been looking for post related to my problem, but I have not found. I´m hopeless, I follow the guide for install and config nginx with fastcgi-mono-server ( ...
10
votes
6answers
3k views

Shellshock: How do I know if my server is compromised + suspicious files to look out for

Three questions which I hope someone can help answer: How do I know if my server is already compromised due to the Shellshock bug ? If it was compromised, is there a particular folder where I should ...
4
votes
2answers
4k views

nginx can't bind to port 80..Nothing running on port 80

I'm trying to setup nginx on Ubuntu 11.04. I have followed the roughly the directions found here: http://library.linode.com/frameworks/sinatra/debian-6-squeeze . I know it is for Debian, but I ...
0
votes
1answer
2k views

How do I rewrite args with nginx if and only if a variable is set?

I can't nest if and I don't have an and operator to use with if, so how would i un-nest this: if ($AUTHENTICATED) { proxy_pass http://backend; { if (!$AUTHENTICATED) { if ($args ~ out=xml) { ...
0
votes
1answer
1k views

Nginx Rewrite rules for clean URLs

I want to write nginx rewrite rules for clean URLs. Everytime the user hits; http://domain.com/abc/12/16/abc-def-ghi I need to execute domain.com/abc.php?a=12&b=16&c=abc-def-ghi Now my ...
0
votes
1answer
862 views

how to get nginx with proxy_pass and if_modified_since to return a 304-Not Modified

I see indications that this should work, so I'm hoping I'm missing something simple. We have two nginx "servers", a proxy_pass cache in front and an SSI server behind it. If I go directly to the SSI ...
0
votes
1answer
13 views

nginx setup to hide the backend if corresponding static file does not exist?

My question is similar to Proxy to "backend" service whenever a file does not exists, except that it should work for the root path as well, where I would like index.html to be returned. ...
-1
votes
1answer
31 views

Why is my nginx load balancer misdirect phpMyAdmin after login?

In my testing server, I have an nginx load balancer pointing to Apache server(s) running on the same machine, and I've installed phpMyadmin under Apache. My nginx config: http { upstream backend ...
0
votes
1answer
22 views

How to make Nginx try_files ignore the port the server listens?

I have a server running both OpenVPN and Nginx on port 443: I configured OpenVPN to run on 443 with the port-share option while Nginx runs on 4545. All of this seems to work except the try_files ...
0
votes
1answer
39 views

Nginx Server Block Config

I'm having a problem with my nginx configuration. I have several virtual hosts on the same server. However, I'm attempting to add another virtual host, this one being an SSL website. The website ...
0
votes
0answers
12 views

Nginx - Mediawiki - Limit access to the connexion page to specified ip

I would like to limit the possibility to connect to my Mediawiki web site to a specified list of ip. The url to connect are : /index.php/Spécial:Connexion /index.php?title=Spécial:Connexion ...
1
vote
2answers
2k views

502 Bad Gateway - nginx

I am randomly receiving 502 Bad Gateway error pages - I can reproduce this issue by modifying hosting plans in plesk 11 and in the same time refreshing a page for a minute or two. When I get the 502 ...
1
vote
2answers
916 views

Nginx + php-fpm - recv() error

I get the follow error in the nginx log [error] 17734#0: *6643 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: [cut], server: [cut], request: ...
8
votes
3answers
7k views

Need to increase nginx throughput to an upstream unix socket — linux kernel tuning?

I am running an nginx server that acts as a proxy to an upstream unix socket, like this: upstream app_server { server unix:/tmp/app.sock fail_timeout=0; } server { listen ...
0
votes
1answer
46 views

Fastcgi request record is too big

I am running an Nginx server, which requires me to accept URI String containing up to 4mb of data. I have configured nginx to accept the params by setting: /etc/nginx/nginx.conf ...
-1
votes
1answer
9 views

Lightweight webserver with SSPI authentification [on hold]

I'm looking for a fast, lightweight web server (for example nginx or lighttpd) which supports authentication to a Microsoft Kerberos authentication server (SSPI). This webserver must run under Windows ...
0
votes
1answer
715 views

How to stop Nginx sending static file requests to the CakePHP app controller when running Cake in a subdirectory?

I'm trying to run a CakePHP app from within a subfolder on Nginx, but the static files are not being found and are instead being passed to the app controller. Here's my current config: location ...
1
vote
2answers
177 views

High io with php-fpm

Recently i have been having some issues with php-fpm and i notice that IO is very high for all php-fpm (99.9%) and that's what causing the cpu load to spike. Top command top - 06:28:53 up 8 days, ...
0
votes
1answer
31 views

nginx wildcard redirect suspicious symbols warnig

I would like to create a 301 redirect on nginx to do this: *.example.gr/en/* => http://www.example.gr/el/ I have tried to do: server{ listen 80; server_name ~^.example.gr/en/*; return ...
0
votes
2answers
32 views

Nginx: Redirect both http and https root to subdirectory

I'm attempting to redirect the root domain for both http and https in nginx to the same subdirectory (https): So e.g. http://example.com -> https://example.com/subdirectory https://example.com ...
4
votes
2answers
197 views

nginx nested upstream

this is my current upstream definition upstream mybackend { server cache-server; server app-server-1 backup; server app-server-2 backup; } Every request goes to cache-server and when it's ...
1
vote
1answer
923 views

nginx proxying websockets, must be missing something

I have a basic chat app written in node.js using express and socket.io; it works fine when connecting directly to node on port 3000 But doesn't work when I try to use nginx v1.4.2 as a proxy. I ...
0
votes
1answer
33 views

File cannot be downloaded completely via PHP from my nginx

I have a file on my tiny server (BeagleBoneBlack) which I want to download to another machine. Therefore I try to do it via PHP from my nginx-web-server. The file size is about 1.2 GB and the download ...
0
votes
0answers
5 views

nginx chunked_transfer_encoding enable/disable inside script

It is possible to control the value of chunked_transfer_encoding on/off sending a header or something from a PHP script? Thank you
0
votes
1answer
35 views

Wrong REMOTE_ADDR and SERVER_ADDR on Apache when using nginx as reverse proxy

I'm on Mac OS X, running Ubuntu in VirtualBox. Mac OS can be accessed in the local network with IP 192.168.0.100 and Ubuntu is 192.168.0.123 (it's using the "Bridged Adapter" option in VirtualBox ...
3
votes
2answers
3k views

nginx with php-fpm downloading php files rather than executing them on mac os x (local environment)

I'm having trouble getting PHP files to execute on my local development machine. I seem to have successfully installed nginx and php-fpm also seems to be correctly installed, and running but can't ...
0
votes
0answers
19 views

502 bad gateway error from nginx when I compile gitlab 6.0.0

I compiled gitlab 6.0.0 follow the instruction https://gitlab.com/gitlab-org/gitlab-ce/blob/v6.0.0/doc/install/installation.md There is no instruction about setup mysql database in this manually so ...
0
votes
1answer
2k views

nginx: problem configuring a proxy_pass

I'm converting a web app from apache to nginx. In apache's httpd.conf I have: ProxyPass /proxy/ http:// ProxyPassReverse /proxy/ http:// The idea is the client send this url: ...
1
vote
1answer
985 views

Nginx worker_processes and multi core cpu's - Do Hyper-threading cores count?

Quite often, when reading about the recommended worker_processes for nginx it is stated that this should be set to the numbers of cores the server hosting nginx has. We were wondering if we should ...
-2
votes
2answers
56 views

Custom nginx error page with 503 index.html and 200 files

Recently I found that my server was encountering a 503 error and was giving out the default (and lame) error page. I want to customize this experience so even when there is a 503 error, the enduser is ...
2
votes
1answer
41 views

Specify a SHA-1 or SHA-2 cert depending on client abilities

With SHA1 certs being deprecated by major browsers it seems wise to get a SHA2 signed cert. But in doing so you will be locking out IE6 users. While for most people this won't be an issue in some ...
0
votes
1answer
2k views

Should `keepalive_timeout` be removed from Nginx config?

Which is the better configuration/optimization: to explicitly limit the keepalive_timeout or to allow Nginx to kill keepalive connections on its own? I have seen two conflicting recommendations ...
5
votes
2answers
1k views

Django rewrites URL as IP address in browser - why?

I am using django, nginx and apache. When I access my site with a URL (e.g., http://www.foo.com/) what appears in my browser address is the IP address with admin appended (e.g., ...
9
votes
5answers
8k views

Proper way to rotate Nginx logs

I would like to achieve rotation of nginx logs that: would work without any extra software (i.e. - best if without "logrotate") would create rotated files with names based on date Best approach is ...
0
votes
1answer
991 views

NGINX - url rewrite regular expression

I have the url such as example.com/page.php?username=test. I want to rewrite this url into something like: example.com/test only if test follows the following regual expression: ...
1
vote
2answers
860 views

redmine gives 404 on static files, works fine elsewise

I have followed http://linux.mickgenie.com/how-to-install-redmine-with-cpanel/ to install redmine on my cpanel box. Got it up and running fine except that it doesn't load any static files (js, css, ...
0
votes
1answer
721 views

rewrite or internal redirection cycle while processing “/index.php” Nginx with Yii

I have redirection cycle. Please help me as I don't know what to do with this. And when I add this code rewrite ^/(.*)$ /index.php?r=$1 ; to the php-related location-block I will get an 500 error ...
0
votes
1answer
1k views

Nginx with Passenger setup problems

I'm trying to setup nginx webserver with Passenger support for Ruby on Rails application on Ubuntu 10.04 (on sub URI). All went fine until I tried to access the server/application from the browser. ...
0
votes
1answer
20 views

Nginx log entries to multiple files

I'd like to log the same access.log entries to separate files, so when a request comes in it should populate a.log and b.log. Is there any way to do this with nginx?
0
votes
2answers
1k views

how change nginx temp & log folder or disable logging completely

I'm running nginx 1.3.5 under windows seven, I need to execute nginx directly from a read-only media (CD or DVD), but when I want to run it, it fails with this error: nginx: [alert] could not open ...
3
votes
1answer
1k views

Running Moodle with nginx in userdir (slash arguments)

I am moving Moodle (moodle.org) from an Apache host to a Ubuntu 12.04 LTS host running Nginx. The way the host is set up means that it will running quite a few domains where every domain (or other ...
0
votes
0answers
31 views

Configuring NGINX with SSL and Node.js on CENTOS 6 in EC2

I'm trying to deploy a Node.js web-app on a Centos EC2 instance with an elastic IP. The SSL certificate is already setup and properly configured. I would like to allow only https connection to my app, ...
0
votes
0answers
30 views

Nginx how to use limit_req_zone on auth_basic to protect against brute force attack?

I have an Nginx server that works as an SSL proxy for a service running on a localhost that doesn't support SSL authentication. I would like to use Nginx's limit_req_zone function to protect the ...
0
votes
1answer
35 views

Nginx + Wordpress: Redirect URLs after moving to Wordpress

I have a classified ads website using a proprietary script and now I am moving it to Wordpress. I want to redirect the old URLs to Wordpress URLs. The script has two main URL types: Category URL: ...
-2
votes
0answers
15 views

Change nginx root on different requests

I am trying to configure nginx. If I enter http://localhost/dav it should use index.php script from configured root (c:/wt-nmp/www/app-dav/frontend/web) in location /dav directive. But when I debug ...