Questions tagged [nginx]

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

Filter by
Sorted by
Tagged with
1
vote
3answers
2k views

Help me enable gzip compression on nginx

Here's the gzip section from my current nginx.conf: gzip on; gzip_http_version 1.1; gzip_vary on; gzip_comp_level 6; gzip_proxied any; gzip_types text/plain text/html text/css application/json ...
9
votes
3answers
2k views

Is it possible to use Shibboleth 2 with Nginx + Passenger?

Do you know if it is possible to use Nginx with Shibboleth?
1
vote
1answer
543 views

Sessions different on FCGI or mod_php?

I have a cluster of webservers running on apache-php (with prefork). I'm planning to move from prefork to worker (fcgi). The problem is that I cannot move all servers at once so for a short period of ...
8
votes
5answers
7k views

Nginx + Apache trailing slash redirect [closed]

I have a Nginx server running on 80 port working as a proxy to Apache 2.2 which is listening to 127.0.0.1:8080 When I access http://hostname/subfolder/ it works great. When I access http://hostname/...
4
votes
2answers
2k views

Comparing Nginx+PHP-FPM to Apache-mod_php

I'm running Drupal and trying to figure out the best stack to serve it. Apache + mod_php or Nginx + PHP-FPM I used ApacheBench (ab) and Siege to test both setups and I'm seeing Apache performing ...
0
votes
1answer
2k views

Is possible to install nginx with push module on windows?

i have an application that make use of nginx and the Nginx Http Push Module (http://pushmodule.slact.net/). Today i use it on linux, but i want to use it on windows. Is there a way or a a pre-compiled ...
0
votes
1answer
1k views

svn over https/ssl + nginx?

is svn ( or any other version control system) over https (so the sending of the code is secure) served by nginx possible scenario? Or do I have to run apache? I don't want to give ssh access ...
2
votes
1answer
305 views

nginx and apache servers

I have my website built with django running on an apache server and I want to install nginx for static file serving. Do you think there is any considerable difference if i put nginx on port 80 and ...
6
votes
4answers
6k views

Nginx + PHP 5.3.3 (with php-fpm) - memory usage?

I recently bought Xen VPS (linode.com) with Debian 5.0 Lenny (i386), 512MB RAM. At the moment I have only three small websites (built with Drupal) with about 600 users per day in total running on this ...
5
votes
2answers
2k 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., http://123.45.67.890/...
1
vote
2answers
3k views

Nginx gives an incorrect CSS mime type when path contains dashes

We migrated our web servers to Nginx mainly for performance reason, flexibility and ease of configuration (In this regard, a great load of satisfaction!). However, only one site showed a strange ...
3
votes
1answer
4k views

Nginx caching based on file type?

I'm using Nginx to serve my static files and proxy dynamic requests to Django. I'd like to cache the static files ("expires 24h;") for all static files except those ending with *.swf. When I was ...
0
votes
2answers
215 views

Nginx to serve only part of a file

I am using nginx and need to serve only Nbytes of a file (or seconds/minutes limit of serving). How is it possible to do it with nginx?
6
votes
2answers
15k views

Configuring nginx for use with Tomcat and SSL

I have Googled and looked at various sample SSL configurations and it seems like I've got things set up right, but there are two problems: When I load https://mysite.com, the lock that should appear ...
0
votes
1answer
200 views

Extending/modifying proxy functionality (concerning the cookie header)?

a few months ago I wrote a proxy in python that modifies certain request. It added a cookie header towards the requested webpage and removed that header on the way back. However I lost this code due ...
1
vote
1answer
2k views

Can Varnish handle hundreds of thousands of requests per second? If not, can I cluster it?

I'm planning to have an architecture similar to: nginx - nginx - nginx - nginx \ \ / / varnish / | \ app server - app server - app server (...
1
vote
1answer
1k views

PHP-FPM very high processors usage

I use a bunch of nginx + php-fpm on a server running Debian Lenny x86_64. Sometimes the PHP-FPM's processes loads all 8 cores at 100% and this load does not fall until to forced restart PHP-FPM. How ...
2
votes
1answer
2k views

help with nginx rewrite

In an apache setup I was masking the wordpress behind the url /admin. I accomplished this with the following rules: RewriteRule admin/(.*).php wordpress/wp-admin/$1.php [L] RewriteRule /admin$ admin/...
0
votes
3answers
343 views

Automated creation of subdomains with additional parameters in nginx or apache

I need to create and remove subdomains automatically using nginx. I know I can do it using the following approach: server { listen 80; server_name example.com *.example.com; root /var/www/...
22
votes
2answers
31k views

Nginx Config: Front-End Reverse Proxy to Another Port

I have a small web server that serves requests on port 5010 rather than 80. I would like to use nginx as a front end proxy to receive requests on port 80 and then let those requests be handle by port ...
0
votes
2answers
288 views

Do nginx fastcgi script permissions stay with script owner or www-data (webserver user?)

Does the fastcgi permissions in nginx work like those in Apache, in which it runs with permissions of the script owner? From what I see it runs with the permissions of the web user. Can it be changed ...
7
votes
3answers
13k views

Why is PHP $_REQUEST array empty?

I installed nginx on Ubuntu Hardy and immediately realized that the PHP scripts were getting empty request arrays, ie whether GET or POST nothing was coming through, even the $_REQUEST array was empty....
11
votes
4answers
22k views

Nginx - Route all requests to single script

I have a PHP script that handles script routing and does all sorts of fancy things. It was originally designed for Apache, but I'm trying to migrate it to nginx for a few of my boxes. Right now, I'm ...
3
votes
4answers
9k views

Nginx and PHP-FPM on OS X

I've been wanting to try out Nginx with PHP-FPM. I installed Nginx via Macports. I read that PHP 5.3.3 includes PHP-FPM, however, the PHP 5.3.3 configuration on Macports does not enable it. Can ...
4
votes
2answers
13k views

Wildcard records with Nginx to handle custom domains

Here's my 4, going on 5 hour problem: I've set up a WordPress multisite instance that's going to be handling sites at domain.com, subdomain.domain.com and customdomain.com. There will be N number of ...
20
votes
4answers
50k views

nginx + PHP-FPM = “permission denied” error 13 in nginx log; configuration mistake?

I've got nginx 0.7x + PHP-FPM running under PHP 5.2.10 on one RHEL5 server, but trying to duplicate that setup under the bundled-in PHP-FPM in PHP 5.3.3 on a second server, I'm having some trouble ...
1
vote
1answer
764 views

Apache htaccess -> Nginx rewrites

Help me please to write nginx rewrites instead of that Apache htaccess: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{...
0
votes
1answer
1k views

How to chain rewrites in Nginx?

I'm new to nginx's rewrite engine. I'm trying to convert my old htaccess file over to nginx's format but I'm running into some trouble. # ------------------------------------------------------ # # ...
1
vote
2answers
114 views

Does nginx invoke php when image resources are requested?

That's the overhead in apache,does it exist for nginx?
0
votes
1answer
2k views

mod_wsgi memory leak?

I've got a django app running through mod_wsgi on Apache 2 (Worker) behind an Nginx reverse proxy (also serving static content). When the app starts to get a bunch of hits concurrently, memory usage ...
0
votes
1answer
715 views

How can I create a graph of Nginx responses by HTTP status code?

I'm looking to create a graph somewhat similar to this: alt text http://static.k5-storitve.net/site_media/images/plugins/51-1170621310-ra.mahune.org-nginx_request-month.png But instead of graphing ...
2
votes
3answers
2k views

How to install reviewboard with nginx?

Does anyone how to install reviewboard with nginx? It currently only has docs for apache and lighty. Thanks
2
votes
1answer
3k views

Convert HTACCESS mod_rewrite directives to nginx format?

I'm brand new to nginx and I am trying to convert the app I wrote over from Apache as I need the ability to serve a lot of clients at once without a lot of overhead! I'm getting the hang of setting up ...
1
vote
3answers
3k views

Setting Environment Variable for nginx and Rails consumption

Apache's module mod_env offers a handy way of setting environment variables in configuration files, like: <VirtualHost *:80> ServerName xyz.com DocumentRoot /var/www/rails_app/public ...
0
votes
3answers
2k views

Nginx load-balancing with sessions

I've seen that setting up load-balancing with nginx is pretty easy and i'd like to give it a try. My only concern is about sessions: how can I take advantage of nginx to route all the subsequent calls ...
1
vote
3answers
4k views

Rails 3 shows 404 error instead of index.html (nginx + unicorn)

I have an index.html in public/ that should be loading by default but instead I get a 404 error when I try to access http://example.com/ The page you were looking for doesn't exist. You may ...
10
votes
5answers
20k views

Does Nginx support LDAP authentication?

Does nginx support ldap authentication? I have just migrated from apache and would like to move all of my authentications which are based on openldap and mod_auth_ldap to nginx. Let me know if that is ...
1
vote
2answers
1k views

high load web server setup

I'm preparing a server setup for a dating website who need to be able to process around 5'000 - 10'000 req/sec to the main site. My idea was to do it this way: Server for static content (css, js, ...
0
votes
1answer
1k views

I'm setting up Ubuntu Server 10.04 LTS, where exactly should all my installs go?

I'm a bit of a noob on setting up web servers, but I want to do it right. I'm using Ubuntu Server 10.04 LTS on a VPS and it's currently a fresh install, with a root user setup and SSH enabled. Aside ...
4
votes
1answer
6k views

Multi-threaded alternative to tinyproxy?

Are there any free, light-weight, single-process (e.g. multi-threaded, asyncore) HTTP forward proxy software? Tinyproxy works great, but it uses multiple processes like (Apache's) prefork. HAProxy ...
1
vote
3answers
3k views

why is nginx redirecting port 80 when listening on alternative ports?

I have several virtual hosts listening on port 80, and one listening on 8080. They have different hosts names. When connecting to port 8080, nginx serves a 301 and redirects to the same host name on ...
2
votes
1answer
295 views

Setting up a proxy on Nginx, very basic

Hi I am used to working with Apache and Mod proxy where I my server configuration looks a bit like this and I redirect all incoming requests from ServerName example.com DocumentRoot /var/www/...
2
votes
4answers
4k views

Deploying django under a sub-URL with Nginx/Fastcgi

I can't for the life of me figure out how to deploy a django site under a non-root location with Nginx/fastcgi, e.g. localhost:8080/myproject/ instead of localhost:8080/; all the examples I have seen ...
4
votes
2answers
4k views

nginx with multiple servers and ssl cert, always use the same ssl

I have an ubuntu hardy with nginx version: nginx/0.5.33 I have multiple servers and they are working perfectly on port 80. Now, some of them I want to serve using SSL on port 443, and each of them ...
0
votes
2answers
132 views

Make nginx be able to access all web files when not running as root

I currently have my server setup as follows A new linux user is created for every website The websites root folder will be owned by this user and has 700 or 500 nginx runs as root:root so it can ...
1
vote
2answers
4k views

Nginx and subversion

I've been migrating some of my machines to be using nginx + php-fpm and ditched apache. However this is not an easy task as I haven't found a way to serve subversion off http using nginx only. Is ...
4
votes
1answer
8k views

Simulate 502 & 504 on nginx

Is there any way to simulate these errors? I created some custom files for it, but I want to be sure that are displayed correctly. I made different message for every vhost. Thank you in advance.
3
votes
4answers
18k views

How to check for the existence of a response header in Nginx rules?

Setting up the rewriting rules for the request proved to be quite easy in Nginx. For the response, not so much (at least, not for me). I want to strip the Content-Type header from the response if the ...
1
vote
1answer
3k views

Passing a timestamp header onto upstream servers with Nginx

I'd like to have my Nginx load balancer send a timestamp in a header onto the upstream servers. I tried something like this: proxy_set_header X-Start-Time $msec; Of course, $msec is a log variable ...
0
votes
1answer
3k views

Nginx: deny requests based on certain conditions

In Apache I have a bunch of rules to block certain unwanted requests. # Block libwww-perl/5.805 from attempting to exploit security vulnerabilities RewriteCond %{HTTP_USER_AGENT} ^libwww\-perl/.+ [...