Nginx ("engine x") is a lightweight, high-performance HTTP server, reverse proxy, TCP stream proxy and mail proxy, released under a BSD-like license.

learn more… | top users | synonyms

1
vote
2answers
589 views

Old nginx on ubuntu server?

I have Ubuntu Server 10.04 with all packages updated. When I type nginx -v I get nginx version: nginx/0.7.65. When I go to nginx.org I see that the latest stable version is 1.0.10 Is it different ...
3
votes
2answers
5k views

Setting up phpmyadmin, got a MySQL syntax error

I tried installing phpmyadmin on Debian Squeeze with a nginx and mysql-server installed. I ran sudo apt-get install phpmyadmin, and all appeared to be going well until setup threw me this: An error ...
1
vote
2answers
1k views

Trying to limit requests in Nginx per URI

I find myself needing to limit the number of requests a particular IP can send for a particular URI (e.g. www.foo.com/somewhere/special) while leaving the rest of the site unregulated. How would I ...
3
votes
3answers
9k views

nginx as reverse proxy with upstream SSL

I'm building a proxy for an internal API to allow clients to connect without having to have the self-signed certificates installed. Clients (built, owned and used only internally) will connect over ...
1
vote
2answers
1k views

Nginx error pages not working

I have the following vhost entry server { listen 80; server_name example.com www.example.com; #access_log /var/log/nginx/nginx-access.log; location /media/ { root /...
1
vote
2answers
75 views

Nginx update rewrites my own starting scripts in /etc/init.d/nginx. Is there a way to avoid this?

I have nginx plus fast cgi. I wroted starting script that starts nginx with fast cgi. But after nginx update system rewrites this script to the default starting only nginx. Is there any way to avoid ...
2
votes
1answer
619 views

Deny all gets overridden by another location block

location /_private { deny all; } location ~ \.php$ { # Workaround PHP vulnerability: # http://forum.nginx.org/read.php?2,88845,page=3 try_files $uri =404; include /etc/nginx/...
1
vote
1answer
2k views

Wordpress admin on nginx+php5-fpm on VPS incredibly slow. Other apps/WP front end run fine [closed]

I thought this might be a StackOverflow question, but I found Nginx+php5-fpm being discussed here at What is wrong in my php-fpm configuration? so I'll post here. Other research done is multiple ...
0
votes
1answer
1k views

nginx shows 403 after http auth successful when proxying

I have a basic sinatra app which is behind nginx so that I can use HTTP Basic Auth to protect it, but I get a 403 Forbidden error instead of seeing the webapp. The app works fine when I remove the ...
0
votes
1answer
570 views

apache rewrite > nginx rewrite

I finnaly got nginx running my site are made with codeigniter and I have this old rewrite from my .htaccess #map all request urls to a specific controller method RewriteRule ^(.*)$ index.php?/...
0
votes
3answers
111 views

use a offside proxy server to optimize site delivery?

Actually we have following setup for our website that gets traffic around the world: All JS, Images, Photos are stored on a CDN: Cloud Files ("Akamai light" powered). The WebApp server who send the ...
12
votes
5answers
17k views

NGINX timeout after +200 concurrent connections

This is my nginx.conf (I've updated config to make sure that there is no PHP involved or any other bottlenecks): user nginx; worker_processes 4; worker_rlimit_nofile 10240; pid ...
1
vote
2answers
2k views

Amazon EC2 t1.micro + nginx + php-fpm = somtimes dead slow

First something about the infrastructure: We have migrated one of our backend/admin servers to amazon. The applications on this server are only used sporadically (max. 10 parallel users). We are ...
2
votes
1answer
2k views

Chromium audit says it's not caching static content, yet headers are set - who is wrong?

I'm hosting redmine with nginx + thin with static content caching Question is: is it or is it not cached by the browser? nginx caching config: location ~* \.(?:ico|css|js|gif|jpe?g|png)$ { # ...
4
votes
1answer
5k views

haproxy as load-balancer and nginx as webserver? [closed]

EDIT: I'm interested in high availability, performance server setup. I read a lot of articles about haproxy vs. nginx vs. apache etc. and this was my conclusion: haproxy is better load-balancer ...
1
vote
1answer
1k views

Why do I need to specify passenger_enabled twice?

I'm trying to set up my nginx.conf to use the asset pipeline in Rails 3.1. I'm using nginx 1.0.10 and Passenger 3.0.11. My nginx.conf looks like this: server { listen 80; server_name .example.com ...
1
vote
1answer
787 views

how nginx serves large files

We have a problem with loading a pdf file which is about 300KB size on our web page. The pdf is being served by nginx. Whenever I load the file, it shows an error saying Failed to open pdf document, ...
0
votes
1answer
566 views

NGINX force non-ssl for a default connection

http:// works well, however, if I am trying to access https:// host, I get an error saying "The connection to the server was reset while the page was loading." (Firefox 8). Furthermore, simply adding ...
1
vote
1answer
328 views

FPM active processes constantly grows

Recently I've had to confront to php-fpm issue with constantly growing of available active process. It was reaching max_children and then restarted. The graph shows "active processes" value from pool ...
0
votes
1answer
2k views

Nginx upstream based on remote_addr

Do you have any idea if there is any easier solution to pass the requests to different upstreams based on the visitor's ip address? The only solution that I found at the moment is: upstream live { ...
0
votes
1answer
1k views

Proxy_pass 127.0.0.1 in nginx does not work

I install nginx as a reverse proxy. If I use: proxy_pass http://127.0.0.1:81 it does not work. But if I use: proxy_pass http://domain.com:81 it works. And I can use browser to access to http://...
2
votes
1answer
1k views

405 Method even when posting to a php file

I been googling, and all I can find is that this error may happen when you post to an html file. In my setup I have a rewrite rule, that basically hides the index.php from the url, and I for the ...
4
votes
3answers
3k views

Redirect http://mydomain.com:12345 to https://mydomain.com:12345 in nginx

I know this must have been answered already, but I have been searching for quite a while, and cannot find the answer. Just not looking in the right place I guess, maybe someone can help me out. ...
2
votes
1answer
5k views

nginx server_name based on $hostname

Based on the nginx wiki the $hostname variable is "Set to the machine's hostname as returned by gethostname ". I tried that and although gethostname doesn't work my debian box it still returns the ...
0
votes
1answer
1k views

Setting up Passenger + Nginx on Arch

I'm trying to setup passenger and nginx on Arch, but I can't seem to get the nginx server to even start. I've followed the guide found here: https://wiki.archlinux.org/index.php/Nginx#...
4
votes
1answer
2k views

Is it possible to see active connections in nginx?

Is it possible to see what URLs are actively being served by nginx (i.e., see the URLs that are in the middle of being responded to, not the ones that nginx has finished responding to). I would like ...
0
votes
1answer
1k views

proxying ip from nginx to jetty/gwt

Good morning! I have nginx setup in front of jetty 6, which is running a GWT application. I am trying to forward the ip address, and all the answers I find on the internet tell me to do this: ...
3
votes
2answers
728 views

Is there a programmatic interface to nginx configuration?

I am using nginx as a load balancer in front of my web server instances. I run 4 instances of the web server and spread the traffic equally across them using nginx. When I am deploying new version - I ...
2
votes
3answers
759 views

Can advanced web servers be faster than basic web servers?

A bsic web server such as python SimpleHTTPServer or THTTPD reads static files with least process; thus is quite fast. Normally, adding more features to create an advanced web server (but still ...
0
votes
1answer
984 views

Incorrect Django redirect from nginx/Apache HTTPS proxy misconfiguration

I'm fairly new to web development, so I know I'm making a beginner mistake with my server configuration. I have an nginx server sitting in front of an Apache server that is serving Django requests. I ...
0
votes
1answer
1k views

ubuntu server upgrade nginx to 1.1.5 from 1.0.10

I originally installed nginx like: apt-get install python-software-properties add-apt-repository ppa:nginx/stable apt-get update && apt-get --yes upgrade apt-get install nginx and I wanted ...
0
votes
1answer
1k views

nginx perl not working

I have NGINX working happily with PHP FPM all tickety-boo. I am trying to add some Perl pages. I have this in my default site config; location ~ \.pl$ { gzip off; include ...
1
vote
1answer
417 views

Apache and Nginx - Forwarding .htaccess requests to Apache?

A really simple one but it's alluding me entirely. I've set up nginx as a proxy for Apache and at the moment it's only set to allow requests for certain files through to Apache, the config line is ...
0
votes
1answer
1k views

Upstart output pre-start script content

Based on the content of the Ubuntu init.d script to control nginx instances, found at : http://wiki.nginx.org/Nginx-init-ubuntu I'm trying to update Upstart version, found at: http://wiki.nginx.org/...
0
votes
2answers
69 views

Correct sbin-path during nginx rebuild

When I rebuilding nginx I am running these commands ./configure --add-module=$HOME/nginx_mod_h264_streaming-2.2.7 --sbin-path=/usr/local/sbin --with-debug make sudo make install Should the --sbin-...
2
votes
2answers
5k views

Ubuntu + Nginx 127.0.0.1 works but localhost doesn't

this one is weird, because I don't have any error messages. I have a very basic default file: server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 ...
0
votes
1answer
400 views

should I activate keepalive in resin/tomcat ? (with nginx/apache)

I'm using resin(tomcat) back in nginx(apache) parse JSP file only,like this: location ~ \.jsp { // 88 is resin(tomcat) port proxy_pass http://localhost:88; }...
2
votes
1answer
880 views

Nginx forwarding requests to the wrong Apache/Plesk Virtual Host

server { listen 81; server_name example.com localhost direct1.example.com www.example.com admin.example.com forum.example.com; location /media/ { root /var/www/vhosts/...
2
votes
2answers
3k views

How to do this Nginx location configuration

I currently have location /folder1 { configuration goes here } location /folder2 { configuration goes here } I want to serve .mp4 files ...
1
vote
3answers
360 views

Will using HAProxy to load balance provide a failover effect

I currently have a site running on an Nginx platform with PHP-FPM and APC. It is performing very well with the tests I have been trying. I would now like to add failover functionality and can't ...
1
vote
1answer
4k views

ubuntu: Installed php-mcrypt but it doesn't show up in phpinfo()

A web app I'm trying to install on my ubuntu 10.04 LTS requires mcrypt, and is generating this error: Fatal error: Call to undefined function mcrypt_module_open(). I know this is the same question as ...
6
votes
2answers
13k views

Using nginx to rewrite urls inside outgoing responses

We have a customer with a site running on Apache. Recently the site has been seeing increased load and as a stop gap we want to shift all the static content on the site to a cookieless domains, e.g. ...
1
vote
1answer
558 views

nginx host server log rotation all sites

I have setup individual log files for each of my sites in the directory /var/log/nginx-hosts/ and I have to configure log rotation for those files. The base I am starting with is /var/log/nginx-...
2
votes
2answers
800 views

DoS attack requesting single file on server, best way to overcome?

My server's currently being pounded by a large DoS, had to move away from Apache and push everything onto Nginx (rewrites are a nightmare!). Sample from the access log: 186.92.86.149 - - [30/Nov/...
5
votes
2answers
7k views

“ImportError: No module named flask” - Trouble with nginx + uWSGI + Flask in a virtualenv setup

I got nginx + uWSGI running on localhost inside a virtualenv with a simple hello world program, but I get this error when I replace the hello world with a simple Flask app: File "./...
0
votes
1answer
2k views

Installing mp4 mod for nginx

I already have nginx installed on my server but I wanted to add the mp4 located at http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Nginx-Version2. If run these commands in my nginx directory ./...
1
vote
1answer
1k views

NGinx vs Varnish as a reverse proxy in front of Apache w/php [closed]

I am using apache with mod_php to serve content. Mostly the content is fetched form memcache over the network. All of my images, css and js are already on a cdn What are the pros and cons of putting ...
2
votes
3answers
3k views

Ruby on Rails Process Stuck at 100% CPU

Environment: Ubuntu 10.04 LTS, Passenger, Nginx 1.0.6, MySQL, Ruby 1.9.2, Rails 3.1 After some amount of time, the server ends up with a gradually increasing number of processes that are stuck at 100%...
2
votes
1answer
814 views

250k connections for comet with node.js

How to implement node.js to be able to handle 250k connections as comet server (client side we use socket.io)? Would the use of nginx as proxy/loadbalancer be the right solution? Or will HA-Proxy be ...
1
vote
0answers
208 views

Large scale custom domain support for a hosted web service

I am running a hosted platform for publishing Markdown documents. Currently I offer a subdomain per user, but the number one request right now is custom domains. My server stack is NGINX and uWSGI ...