nginx (pronounced “engine x”) is a lightweight web server and a reverse proxy server

learn more… | top users | synonyms

17
votes
2answers
2k views

Why does the percent sign in a URL cause an HTTP 400 Bad Request error?

I stumbled upon this by accident when mistyping the URL for a web page in my web browser. Why does visiting http://example.com/% cause an HTTP 400 Bad Request error to be thrown? Is the server ...
16
votes
5answers
15k views

How do I start nginx on port 80 at OS X login?

I installed Nginx using homebrew and after completing the installation the following message was displayed: In the interest of allowing you to run `nginx` without `sudo`, the default port is set to ...
10
votes
2answers
10k views

How do erase the contents of a error.log file but keep the file intact

I want to erase the contents of the file error.log (nginx error log file), but I don't want to actually delete the file. is this possible? running ubuntu
8
votes
3answers
4k views

I can't open phpMyAdmin, get error 301 or 500

I've installed phpMyAdmin, but I can't open it on any browser: I get a 301 redirect(*) if I browse to http://localhost:8080/phpmyadmin. If I add a / to the end of the addres, I get a 500 error status ...
7
votes
1answer
11k views

Nginx: Serve static files out of a given directory - one level too deep

I'm pretty new to nginx configs. I'm having some difficulty with a pretty basic problem. I'd like to host some static files at /doc (index.html, some images, etc). The files are located in a directory ...
7
votes
2answers
7k views

Nginx as forward proxy for HTTPS

While I was able to successfully configure nginx to proxy HTTP traffic (using this guide), all attempts to proxy HTTPS requests resulted in code 400 (Bad Request). Nginx debug logs weren't helpful at ...
7
votes
3answers
2k views

Mac firewall blocking nginx (port 80) from external side

I installed nginx using ports and started it with sudo. Accessing the nginx welcome page from localhost works perfectly, however accessing it from an external computer fails. Doing an nmap on the ...
6
votes
0answers
706 views

Should we still set cgi.fix_pathinfo=0 when configuring nginx+php5-fpm? [closed]

Security breach was found in nginx+php5-fpm default configuration in 2010. A lot of nginx+php5-fpm configuration guides tell us to set cgi.fix_pathinfo=0 to be safe. Is it still actual for current ...
5
votes
1answer
4k views

How to make nginx rewrite URIs in HTTP body content?

This is a follow-on to my earlier question on how to Make nginx reverse proxy 302 redirect to a URI sub-folder instead of root. I have an nginx proxy server that uses the rewrite and proxy_pass ...
4
votes
1answer
6k views

Nginx rewrite rule to remove path node

Let's say a user tries to access a given image on my website using the following url: http://www.mywebsite.com/blog/image1.jpg?someParam=100 i need a rewrite rule to this, removing the 'blog' node ...
4
votes
1answer
6k views

Nginx can't find PCRE library on Ubuntu Server

I have been trying to get a Passenger and Nginx setup to work with php files but I am having problems with the PCRE regular expressions library. Install all went fine so I'm assuming it found the ...
4
votes
0answers
4k views

Why a listen 443 default_server; nginx rule override already configured rule (http rules working normal way)?

I have an nginx and different subdomains: a.mydomain.com b.mydomain.com c.mydomain.com Nginx has 4 rules: 1) rewrite rule: server { listen 80 server_name gl.udesk.org; root /nowhere; ...
4
votes
1answer
4k views

Subversion over https + WebDAV on nginx

I wonder how do I create SVN repo and let users access it over http[s] + WebDAV on nginx I did not find any good tutorials describing this process whilst there are a lot of answers on this scheme but ...
3
votes
3answers
4k views

How to I get variables from location in nginx?

The location from nginx conf: location ~/photos/resize/(\d+)/(\d+) { # Here var1=(\d+), var2=(\d+) } How to I get variables from location in nginx?
3
votes
1answer
23k views

How to uninstall Nginx (installed from source) on CentOS?

I compiled Nginx now I want to remove or uninstall it. How can I do that? I usually don't install software by compiling it from source.
3
votes
1answer
3k views

NginX+PHP-FPM setup: Why is this configuration workaround needed to properly set PATH_INFO? [Debian7.4]

It took several hours to find out how to properly configure NginX, but I still think I might have missed something. Mainly because this perfectly working setup raises more questions than it answers. ...
3
votes
1answer
6k views

Make nginx reverse proxy 302 redirect to a URI sub-folder instead of root

I have a web server on my LAN with the URL https://10.0.0.22 and I am trying to access it from the internet through an nginx reverse proxy with a URL like https://domain.com/my/web/app. The ...
3
votes
3answers
1k views

How to remove double slash in URLS served by nginx?

I need to replicate the following Apache rewrite rules in nginx config. What is the nginx equivalent to : RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] Target environment is ...
2
votes
2answers
234 views

Is it a bad idea to get my production servers software source code from github

Usually I use apt-get but apt-get can get out of date. It seems that quite a nice solution may be to get the source code for my software (for example, nginx) from github and then build it each time. ...
2
votes
2answers
92 views

Should web servers be run by a special user?

I'm pretty beginner-level at Linux, and one thing I've always wondered was whether things like Nginx / uWSGI (for a Django project) should be run under a user that was created for that purpose, or ...
2
votes
4answers
3k views

Configure Fedora 15 Linux to allow access via port 80 from other computers

I am trying to make my home server accessible to the whole web. I have installed Nginx on my Fedora 15 64-bit Linux machine, and it works with localhost but it doesn't work online or allow other ...
2
votes
2answers
1k views

Nginx Reverse Proxy Apache Benefits

Can anyone explain why putting up nginx and reverse proxying Apache is faster than just plain Apache? I've already moved all my static files to s3 (I heard nginx is better at handling static files), ...
2
votes
1answer
1k views

Nginx works on my linux machine but is not accessible from other computers in my local network

In my LAN network I have a server with Scientific Linux (RedHat or Fedora based distro), I've done yum install nginx but the welcome page is not accessible from other computers in my network. When I ...
2
votes
1answer
3k views

How to set up two Node.js apps in one nginx config

Scenario: First node.js app is running on 127.0.0.1:8888 and serving only one route 'domain.com/track.gif' Second node.js app is running on 127.0.0.1:3000 and it's a dashboard for stats gathered by ...
2
votes
1answer
211 views

How to Set Up Nginx as a Reverse Proxy

I am trying to set up nginx to behave as a reverse proxy listening on a subdomain we control. I have followed examples found online and they mostly work with one exception that isn't clear to me. ...
2
votes
1answer
384 views

Nginx - How to publish multiple Python web apps using virtual directories and access them via IP and virtual directory (http://HOST_IP/APP_DIRECTORY)?

I am a IIS - Internet Information Services (Microsoft Windows) user and I would like to migrate to Nginx. How can I publish multiple web applications in Python using virtual directories (IIS style) ...
2
votes
1answer
3k views

Permissions for SSL key?

I'm trying to set up a secure connection (https) in nginx. But I'm a bit worried about the private key's permissions, which aren't mentioned in any tutorial. Should I change them? To what?
2
votes
1answer
321 views

How can I force caching a video file on nginx

I have two servers configured pretty much exactly similarly. One is my production server, and the other is my staging server. The nginx config on both are copies of each other except for the name of ...
2
votes
1answer
296 views

Special characters in filenames + nginx + php = 404

Recently I moved to a new server after the old one had died. I had wordpress installation there, powered by Apache2 and Gentoo Linux. When moving, I decided to use nginx and Debian instead. I brought ...
2
votes
1answer
1k views

Any modules to handle HTTP OPTIONS requests in nginx?

I'm using nginx on Ubuntu 12.04, is there any module I can install via the Package Manager to make nginx magically support HTTP OPTIONS header requests instead of returning HTTP 405? I'd like to avoid ...
2
votes
2answers
644 views

Nginx can't connect to uWSGI socket with correct permissions

I'm trying to connect Nginx to uWSGI so I can run an application written in Ruby (where I am not able to use passenger). This is my virtual host configuration: server { listen ...
2
votes
0answers
520 views

Nginx rewrite to remove first (generic) path node

I am currently writing a dispatcher that will dispatch different URLs to specific service URLS. I essentially want to dispatch something like: POST ...
2
votes
1answer
229 views

Configuring nginx to retry a single upstream server

I'm using nginx as a reverse proxy and I would like it to wait some number of seconds and retry a request if the upstream server isn't responding. This way I can restart my upstream server and instead ...
2
votes
0answers
132 views

Url rewriting faliure in case of UTF8 urls in nginx

I am using Nginx webserver and I want to rewrite some old urls on my site to new ones inorder to prevent 404 errors. For English urls everything is OK and adding a rewrite rule like the following to ...
2
votes
0answers
1k views

Establish https on nonstandard port

I'm trying to estamblish https on port 55434 (different than standard 443). My nginx configuration looks like this: server { server_name example.org; listen 55434 ssl; ssl ...
2
votes
0answers
305 views

PHP : curl is and Not working in ubuntu10.04 and Nginx

I am running Nginx server on ubuntu 10.04 I am using the php version 5.3.2 .I installed php5-curl using apt-get install php5-curl. Unfortunately the curl package is not displaying in phpinfo() . ...
2
votes
0answers
335 views

Raspberry Pi, Mercurial and nginx

I am posting this here, as apparently, I am unlikely to get any help at raspberry pi. Please bear with me. I have a small problem with configuring Mercurial to work with nginx using unix sockets on ...
2
votes
0answers
188 views

how do I enable debug logging in php5-ldap

I have phabricator running on Ubuntu behind nginx and php5-fpm, and now trying to figure out why ldap logins fail. Is there a way to enable verbose logging of the php-ldap code? What file is the log ...
2
votes
0answers
737 views

How to fix the authentication error “request-digest mismatch” using cadaver and WebDAV on nginx?

I use nginx 1.3.9 with the extensions nginx-dav-ext-module and nginx-http-auth-digest. The problem seems to only occur when I try to log in with cadaver, it’s possible to access the DAV share with ...
2
votes
0answers
1k views

How can I pass environment variable in nginx conf?

I have nginx conf as location /static/ { alias $HOME/code/python/vlists/vlists/static/; # if asset versioning is used if ($query_string) { expires max; ...
2
votes
1answer
771 views

Can't install Gearman on Red Hat

I'm having problems installing Gearman from Red Hat on Amazon. I couldn't find a repo so I downloaded Gearman version .25, installed it and installed drizzle from their repo using: yum install ...
1
vote
2answers
423 views

what if set x.domain.com and y.domain.com to the same ip address in DNS?

if I set x.domain.com and y.domain.com to the same ip address, Does it mean Nginx couldn't tell the differences between x.domain.com and y.domain.com? Is it impossible to map x.domain.com and ...
1
vote
2answers
894 views

Can't setup Nginx with PHP on Arch linux

I have tried to set up a LEMP server (Nginx, PHP, MySQL) on Arch Linux for a while, and have tried a few different online tutorials. Most recently I tried: http://www.adminempire.com/how-to-insta … ...
1
vote
1answer
1k views

Error install nginx version 1.6.2 in Ubuntu 14.04

My server is Ubuntu 14.04 the info.php is blank :( I do not really know what's happening I want to install the latest version of nginx I followed these steps: install nginx apt-get install ...
1
vote
1answer
4k views

nginx don't log anything

I'm running a FreeBSD 9-Stable server, with nginx. My configuration is here: user www www; worker_processes 5; error_log /var/log/nginx/nginx-error.log; events { worker_connections 1024; } http { ...
1
vote
2answers
338 views

Does apache + nginx and sphinx provide benefits when deploying Magento

Can any provide a method where I can establish which of the following configurations would provide the best performance for a Magento based site: apache + mod_php apache + mod_php + nginx (as proxy ...
1
vote
1answer
2k views

How can I open Port 80 with Netgear wireless router wnr2000v3

I am trying to set up a home server. I realized that my ISP was blocking port 80. I called them and paid them for a static ip and now they are not blocking port 80. When I connect the server directly ...
1
vote
4answers
354 views

Quick SSH proxy or routing?

I have experience with using nginx to proxy sites with the proxy_pass directive. Is there something similar I can do with SSH? Here's my home network with my machines and their hostnames: ...
1
vote
1answer
2k views

Check to see if NGINX is installed on UBUNTU

Is there any or command to check whether NGINX is already installed on UBUNTU Linux using a bash command/script? I was trying something like this echo "BEGINNING INSTALLATION OF NGINX WEB SERVER" ...
1
vote
1answer
609 views

How to redirect to other server? (apache and nginx)

i have an Apache server running for two sites on port 80. Let's say the domain is example.com and I have an other domain example2.com. When a user visits example.com, I want it to serve those files ...