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

learn more… | top users | synonyms

16
votes
2answers
1k 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 ...
13
votes
5answers
13k 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 ...
9
votes
2answers
8k 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
3k 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
9k 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 ...
5
votes
2answers
1k 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 ...
5
votes
1answer
2k 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 ...
5
votes
0answers
405 views

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

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 ...
3
votes
2answers
3k 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
3k 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
1answer
5k 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 ...
3
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 ...
2
votes
2answers
223 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
90 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
2answers
5k 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 ...
2
votes
1answer
4k 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 ...
2
votes
1answer
22k 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.
2
votes
1answer
796 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
2k 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
314 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
82 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
218 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
2k 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
0answers
75 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
2k 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; ...
2
votes
0answers
249 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
140 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
627 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
888 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
693 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
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 ...
1
vote
2answers
382 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
517 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
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), ...
1
vote
2answers
314 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
910 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. ...
1
vote
1answer
936 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
209 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
734 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
1k views

unable to connect to localhost:80 after installing nginx

I just installed nginx by doing sudo yum install nginx and I'm unable to connect to it on port 80. I tried stopping iptables by doing sudo service iptables start and was still unable to connect. I'm ...
1
vote
1answer
870 views

Rotate nginx logs every 30 minutes with logrotate

Can I rotate the nginx log every 30 minutes? Like: 10:30.log 11:00.log 11:30.log etc.
1
vote
1answer
712 views

Command to update terminal as file is updated

I'm looking for a way to have the access log for my nginx install scroll up the terminal as lines are added to the log. I think I need a command like cat access.log | diff but I'm not sure exactly ...
1
vote
1answer
528 views

Apache / Nginx - Reverse Proxy and Kerberos Constrained Delegation

I am after a solution to replace Microsoft TMG, and i am hoping there is an open source route of acomplishing. Currently using TMG we are reverse proxying Web resources say for example sharepoint, ...
1
vote
1answer
703 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 ...
1
vote
1answer
176 views

Updating Nginx from 1.3.0 to 1.4.1 while using Plesk 11

Is it possible to upgrade the nginx version witch was originally installed with plesk to the newest stable version without bricking the whole web-server? I got the nginx repository and tried to ...
1
vote
1answer
76 views

Define extra `$PATH` for either Passenger or nginx

I have a server with nginx and Passenger serving a Ruby on Rails app. It uses Bundler. Somewhere in this stack, the $PATH gets set to /var/www/APPNAME/shared/bundle/ruby/1.8/bin/. This directory ...
1
vote
1answer
335 views

How to “try_files” on different domain using nginx?

How can i config try_files to "try" and search files on a different different domain? what i've tried: location ~ .flv$ { limit_req zone=one burst=2; root /; internal; ...
1
vote
1answer
662 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 ...
1
vote
1answer
200 views

How to reinstall nginx from source? (was installed with apt-get)

I want to install this module. The problem is it requires that nginx is installed from source. I have it installed via apt-get install, and it is already serving web pages. So which steps would you ...
1
vote
2answers
362 views

Renaming Nginx 1.3.5 Server: response header

In nginx 1.2 & 1.3 you can modify the source to change the name: src/http/ngx_http_header_filter_module.c (lines 48 and 49): static char ngx_http_server_string[] = "Server: Not Nginx" CRLF; ...