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

0
votes
1answer
1k views

nginx rewrite rule to replace .php endings with /

Basically, I want the ".php" to be replaced with a "/". I tried to just put my rule in the same location where the fastcgi is located. location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; ...
0
votes
2answers
1k views

Nginx + PHP-FPM Benchmarking with JMeter - Spikes

The setup is EC2 Micro instance Nginx 1.0.0.5 with FPM PHP 5.2.17 with CGI App connects to MySQL on RDS Collectd for monitoring JMeter is used on other servers on same EC2 region (so latency is ...
0
votes
1answer
520 views

Nginx reverse proxy to apache gives timeout if you dont put in a trailing slash

I have got nginx to reverse proxy any requests to dev.example.com to apache. It all works fine, and I installed wordpress on the url "dev.example.com/wordpress/". The weird thing is that if you type ...
1
vote
3answers
132 views

Moving entire server data to another server

I would like to ask if its possible. I have recently ordered a new dedicated server for my website. The server is slightly different from the current one. Both are quad core xeons, the differences are ...
0
votes
1answer
243 views

Nginx and Frog CMS admin url

Short background - there is a site (powered by Frog CMS) hosted on VPS with Apache installed. To cut costs a bit, I've moved to another VPS hosting with cheaper plan. I've installed nginx, php-cgi ...
2
votes
2answers
695 views

Adding websites to nginx without restarting nginx

There are many companies that load a web application for you on their servers like say wordpress etc., and since they have other customers on the same server I was curious how they do this w/o having ...
1
vote
1answer
870 views

nginx returns 404 on files with special characters

I just switched over to nginx as a static file server and it works for the vast majority of files but it's throwing a 404 on certain files with special characters. This is Kevin Worthington's 64 bit ...
1
vote
2answers
233 views

How to serve static files very fast?

I'm looking for a solution need to serve a few XML files to as many users as possibly. My current solution are static files and a Nginx server. The files a small so I could them also hold in memory. ...
4
votes
2answers
1k views

Strange request in access.log, how to block?

I am using nginx on my own server, and I noticed a few days ago some strange request in my access.log : 77.50.217.37 - - [19/Aug/2011:17:50:50 +0200] "GET http://images.google.com/ HTTP/1.1" 200 151 ...
0
votes
1answer
3k views

Nginx+PHP-FPM+APC+Varnish+Memcached: High Mem/Swap consumption?

I've got running a VPS at Linode with 1024 MB RAM, Ubuntu 11.04 and Nginx+PHP-FPM+APC Varnish+Memcached active. I've setup a couple of test blogs with WordPress 3.2.1 and everything works, and the ...
0
votes
2answers
732 views

Nginx as a reverse proxy and static/dynamic content server at the same time?

Can I use the same Nginx installation as a reverse proxy (for apache+mod_wsgi) and use it to serve static content and PHP over a single IP address at the same time?
1
vote
2answers
1k 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: ...
0
votes
1answer
90 views

Nginx rewrite /path?params to /longer/path.html?params

Simple one - but I would rather use location + rewrite vs if + rewrite (if is evil, correct?) old url: /app?key=1234 new url: /system/app.html?key=1234 Tried location /app { rewrite ^/app$ ...
6
votes
1answer
15k views

How to quick and easy remove part of an URL in Nginx with HttpRewriteModule?

I know about the HttpRewriteModule, but I don't really know how to handle regex and I would need to redirect all URLs within a certain directory to another, specifically ...
0
votes
1answer
551 views

nginx is slow in parsing php with html content

I don't know why but nginx seems to be quite slow while the browser requests a php with html content ?? [ It's quite weird ] And this is my php-fpm.ini : ;;;;;;;;;;;;;;;;;;;;; ; FPM Configuration ; ...
1
vote
3answers
2k views

Varnish/Nginx/Apache/APC/Memcached

I'm setting up a new web server and was wondering if the following is a valid stack: Varnish in front to cache and split traffic between nginx for static content and Apache with mod_php for dynamic ...
2
votes
2answers
4k views

Setup CNAME for subdomain issue

I would setup for this: user go to test.example_site1.org test.example_org1.org it's a CNAME of test.example_org2.org user will see the page of test.example_org2.org On the example_org2.org server ...
0
votes
2answers
8k views

Disable nginx caching for images in particular directory

There is a directory on my webserver which contains images that I don't want to be cached. Nginx is frontend to Apache. I have caching enabled for static resources in nginx.conf: server { listen ...
1
vote
1answer
3k views

Install phpmyadmin on nginx

I try to install phpmyadmin to work with nginx in my archilnux box but I seem have some problem. The steps below is exactly what I've done : sudo pacman -S phpmyadmin Then I create a symbolic link ...
2
votes
2answers
2k views

Getting rid of “Welcome to nginx!”

I've just setup nginx on my Ubuntu staging machince. Entering http://192.168.1.1./index.php works like a charm and loads the index.php file i've put in the /var/www/public_html folder. ...
0
votes
1answer
921 views

nginx try_files confusion

The setup I'm going for is as follows: I want nginx to look for a file in the /test subdirectory, and if it's not there, serve it from it's normal uri. I figured this would be fairly straightforward ...
0
votes
3answers
2k views

Forward requesting IP from Nginx to Apache's logs

I'm using nginx as a front end reverse proxy for Apache, I have the following configuration inside of nginx: location / { if (-f $request_filename) { add_header X-Static hit; access_log ...
1
vote
3answers
1k views

PHP-FPM with nginx load balancing long request blocks all other requests

I have three servers, the load balancer runs nginx and passes the PHP requests upstream to one of two servers running php-fpm. I was actually trying to test concurrency in the first place, so the php ...
1
vote
1answer
133 views

Site does not load when configuring Wordpress with nginx/PHP

I have a Wordpress site running on Apache that is heavily overloaded, so I want to try replacing it with nginx/fastcgi to see if it would help. I compiled spawn-fcgi and nginx configured a server ...
1
vote
1answer
1k views

Turn off gzip compression for one virtual host

I'm running into a problem where I think PHP deprecation errors are causing the headers to be malformed, causing a 330 error. If I disable error reporting for E_DEPRECATION, the error disappears, so ...
0
votes
1answer
390 views

LAMP server (for wordpress blog) setup with APC caching and CDN, Good?

I've asked relatively similar questions ("similar," not "same") on SF before, and the answers mostly invoke another new question. Please help me end this once for all... I am a total beginner ...
1
vote
1answer
2k views

Configure auth_basic with Nginx and Passenger

I'm trying to set up a basic authentication with Nginx. My server configuration look like that: server { listen 80; server_name DOMAIN; root /var/www/web-front-dev/current/public; error_log ...
6
votes
2answers
7k views

Nginx or Apache as web server in front of Tomcat (Java app)?

just wondering which web server between Apache and Nginx is better supported from Tomcat? I'm attracted in using Nginx for the single-threaded feature. I want to deploy a Java app running on HTTPS. ...
3
votes
5answers
2k views

Which Is a Good Starting Point For Beginner? Apache, Nginx or Cherokee?

Any of these web server software i.e., Apache, Nginx and Cherokee is suitable for my website at the moment. And I am learning sysadmin to be able to manage my server (and not for a job). For a ...
0
votes
1answer
187 views

nginx if not in directory

I want to create an if statement in nginx configuration that says if location is not /images/ directory then do something. I can do this to say if it is in the images directory but don't know how ...
6
votes
2answers
2k views

Nginx infinite redirect loop

Why is http://compassionpit.com/blog/ going through an infinite redirect loop? Here's my nginx conf file. The site is run by a nodejs server on port 8000 and Apache serves up the blog (wordpress) ...
0
votes
2answers
473 views

Reverse proxy Nginx error with accessing munin

Now, I have munin setup so that it can be accessed by any virtual domain on my server by adding /munin/ to the end of the virtual domain. Apache alias setup looks like this -> Alias /munin ...
5
votes
1answer
6k views

Can nginx listen on port 80, but send upstream to backend using SSL on 443?

For PCI compliance, my application is forced to use a secure/encrypted connection between the reverse proxy server and backend app server, whereas the connection coming into the reverse proxy is on ...
1
vote
1answer
121 views

download speed become too low with reverse proxy

I've set up nginx reverse proxies to send requests to Apache servers, to serve each incoming request so that the static content will be handle by itself and dynamic will be sent to Apache running on ...
1
vote
1answer
454 views

Addressing slow to connect time issues on NGINX

I intermittently perform 3rd party speed tests using http://tools.pingdom.com on my server. Recently, I have started to see long yellow bars for some of the static content on my sites, like images and ...
1
vote
1answer
195 views

Nginx as Reverse Proxy for Apache

I have nginx running as reverse proxy for apache for my website. The problem I have is that all the logs in apache have 127.0.0.1 as the IP address. I have these set in nginx.conf proxy_set_header ...
11
votes
3answers
9k views

NGINX as http proxy server (not reverse proxy) [closed]

Is it possible to use nginx as ordinal http/https proxy? (not reverse http proxy) UPDATE: Yes, i know about squid/oops/tinyproxy/etc. Please do not answer if you dont know answer to question (or just ...
0
votes
1answer
1k views

Nginx PHP mbstring

I used this tutorial to install nginx on my Centos server http://moon.mastipoint.net/research/nginx-php-fpm-mysql-on-centos.html. I have everything running, however, I can't figure out how to install ...
3
votes
2answers
2k views

Nginx + php-fpm VS Nginx as a reverse proxy for Apache

Can someone enlighten me whats the advantage of having NginX as a reverse proxy to Apache. People suggest it so that static content is handled by nginx and dynamic content (php files) are handed over ...
0
votes
1answer
295 views

Serving a page whose URL ends in a slash with nginx

I want to make nginx serve an HTML file for /foobar/. I tried 2 configurations and neither worked. In Apache you do it like this: AliasMatch ^/foobar/$ /home/admin/foobar/foobar.html My first ...
1
vote
2answers
188 views

weird apache rewrite regex

I'm in the process of migrating a setup from apache to nginx. In this process I've come across this rewrite rule in an .htaccess file: RewriteRule ^/?(?:(?!one|two|three|four).?)+/?$ ...
0
votes
2answers
281 views

nginx + MySQL + php5 + Wordpress: Too much php5-fpm processes

I have this web server running on nginx + MySQL + php5 + Wordpress. The thing is, the server is to slow and I think it's due to the number of php5-fpm running. Look at the numbers of php5-fpm ...
2
votes
4answers
2k views

Real-time log parsing and reporting

We have a small project we are working on part-time that runs on Nginx/MongoDB on Ubuntu 10.04 LTS Server. We'd like to be able to see reports on things like server load, requests/sec, response time, ...
1
vote
1answer
197 views

Creating secure, resilient Rails and mysql servers on EC2

I'm wondering what practices should be used to create secure and resilient Rails and mysql servers on EC2. More specifically, when I say "secure and resilient", I am trying to balance the fact that I ...
1
vote
1answer
565 views

How can we solve these errors for Nginx + PHP + FastCGI?

We're using Nginx + PHP + FastCGI for our web server and we just saw a bunch of timeout errors (see below) in the error log. We quickly restarted nginx and that fixed the problem - for now. However, ...
1
vote
4answers
1k views

Fastest/scalable way to serve static files?

What options are there to serve static files very fast? Are there any options that allow caching the file in the memory of the server, etc? For example caching the js files in the memory. I know of ...
7
votes
3answers
7k views

nginx passing back custom header

I have the following example location / { proxy_read_timeout 2000; proxy_next_upstream error; proxy_set_header X-Real-IP ...
5
votes
4answers
2k views

Comet with uwsgi and nginx, how to turn off the output buffer?

How can I prevent Nginx from buffering the output of my uwsgi app? For my comet style application I'm using long polling and the requests are now buffered. I tried to reduce the size of the buffers, ...
0
votes
3answers
353 views

How do I configure my server to forward “domain.com” to “www.domain.com”?

I need to forward all visitors from "domain.com" to "www.domain.com". I know this has something to do with altering the nginx config file but am not sure what to do or what code to use. I am using ...
0
votes
2answers
965 views

apache mod-rewrite to nginx rewrite

I just changed to NGINX from Apache and I am using Zencart with Ultimate SEO for friendly urls I have tried to convert my .htaccess rules for NGINX but I get "No Input file specified" or a 404 error. ...