nginx (pronounced "engine-x") is a lightweight, high-performance Web server and reverse proxy as well as IMAP/POP3 proxy server.

learn more… | top users | synonyms

-2
votes
3answers
79 views

nginx and php | can't resolve hostname and make connection with FQDN

I don't know what can cause this problem, nginx configs or php or anything else but : I can not make connection when host value for these php functions listed below is set to FQDN like ...
0
votes
0answers
28 views

How to configure Ajenti V hosted website with extension less URL

I am trying ways to configure my website to be extension less. That is when .php or .html files are visited, it'll be redirected to an URL without the extension. Eg: www.mywebsite.com/products.php ...
-1
votes
0answers
20 views

Meaning of colon

I'm working with nginx and I've seen quite a few times rewrite and matching rules that contain colons. I've tried searching for documentation but I haven't found any explanation so far. I guess it is ...
0
votes
0answers
33 views

Nginx Config not displaying right site for subdomain [duplicate]

My config below is not working for some reason, I have checked the following: file ownership file permission nginx debug the configs in sites-enabled and sites-available are symlinked I assume the ...
1
vote
1answer
46 views

Nginx unmet dependencies over Vagrant / Puppet

I have no such issue on 64bit Ubuntu Precise, but once I tried to start 32bit machine, it failed on this command: # /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install ...
1
vote
0answers
16 views

Closing proxy to service socket when client is lost

We are using nginx, right now 1.6 to reverse proxy our services to the client. We are also using Server-Sent Events, a layer on top of HTTP that keeps the socket open. Here is a piece of required ...
0
votes
2answers
34 views

How to set proxy_pass on nginx

Bit of an nginx noob here. I'm trying to setup nginx to reverse proxy all web traffic to a locally running web server. Right now it works but it says the IP address of every logged in user is ...
0
votes
1answer
24 views

Nginx not catching subdomain

I have added a subdomain: http://vma.ottawakaraoke.com/ However it is serving back the root of an entirely different subdomain. Its serving up the content from http://summitent.ca/ - a totally ...
0
votes
0answers
20 views

Can nginx be configured to distribute webdav PUTs of files to multiple destination folders?

I would like to have a single location available for webdav PUT requests but have files put into multiple destinations on disk. The set of destinations can be based on a preset list of them, or ...
0
votes
2answers
23 views

How to prevent nginx caching blank pages?

I have nginx 1.4.3 running on a Ubuntu 12.04 machine. I have nginx set up to cache pages (they are database-driven but stay fairly static). I'm using MySQL and PHP-FPM. However, I found that I would ...
0
votes
3answers
31 views

Nginx server redirect being ignored

I'm must be stuffing this up somewhere but can't see where. Nginx appears to be ignoring the following redirect. This currently resides in its own conf file, but I have placed it in the other files. ...
0
votes
1answer
25 views

tomcat7 + nginx ssl causes redirect loop

We have the following set-up: several subdomains lead to the same server, which is running nginx as a proxy to each of them. All subdomains are currently used for testing features in development, so ...
0
votes
2answers
29 views

Serving assets on two different ports

I have one PHP app running on localhost port 80 and another running on port 81. Pointing the browser to http://localhost runs the first app and all of its assets: js, css, imgs in the /assets folder. ...
0
votes
0answers
36 views

Set disable_functions parameter per vhost

I'm trying to use the disable_functions directive for php with different values for each of my domains. First time a tried with nginx's fastcgi_param PHP_VALUE. It worked well until I had more than ...
1
vote
1answer
52 views

PHP NginX - Output Buffering - Video Streaming

(Since it contains some coding but also it's concerning nginx configuration i think it would be the best to have it in serverfault). I have some Video Files in my Server that are stored in a folder ...
0
votes
0answers
32 views

Server configuration in production for Django applications

I want to deploy my Django project to production as follows: example.com # redirect to www www.example.com # for dynamic files static.example.com # for static files media.example.com ...
1
vote
0answers
16 views

Varnish config to fallback to another port

I am playing around the different config setups. Currently I have Varnish-cache in port 80, Apache2 in port 70 and Nginx in port 90 in the same machine. The Varnish is configured in such way that it ...
0
votes
2answers
31 views

Remove www from domain name in nginx

I want to remove www. from both the main site and all sublevel domains. I don't care how many levels into the TLD I am; www is banned from use. It should issue a 301 redirect. www.example.com ...
1
vote
1answer
19 views

Nginx auth behind Rackspace Load Balancer

I cannot seem to get Nginx basic auth working from behind a Rackspace cloud balancer. First I am using this code (it is also using real IP module here which was one of the mannny solutions I tried) ...
1
vote
0answers
43 views

nginx not showing right root for subdomain

I have a subdomain with a magento store on it, well at least that what I want. It seems that nginx isn't detecting it for some reason and is just serving the default root back. So when I type in ...
0
votes
0answers
24 views

setcookie inside a loop causes 502 bad gateway error [closed]

There are a lot of similar questions on stackoverflow, but none of them works for me. I have no access to nginx config and cannot change anything there. Nginx isrunning as proxy for Apache web server ...
1
vote
0answers
24 views

nginx proxy won't retry if backend is unavailable

I have an application that sits behind an nginx reverse proxy. Nothing fancy, just a simple server { listen 54321; proxy_connect_timeout 5000ms; proxy_read_timeout 5000ms; location / { ...
1
vote
1answer
40 views

Does using fastcgi_keep_conn in nginx increase performance for php-fpm?

The nginx docs say that keepalive for fastcgi cannot work if the fastcgi_keep_conn is not on. However, I can't find any further details on this. I already have keepalive enabled server-wide. I am ...
2
votes
1answer
67 views

High Mysql Connections

Having a challenge discovering why results are as they are. Perhaps missing something obvious. Sorry this isn't very specific. But if anyone has an pointers on areas to focus on that would be very ...
0
votes
1answer
33 views

Nginx reverse proxy with same config working in 2 situations and not in 1 (Vestacp)

I have few vps machines with private networking. I'm using nginx in all of them to proxy pass pass requests into fourth machine (10.129.xxx.xxx) which is only listens private connections. I just ...
2
votes
0answers
46 views

starting nginx on mac fails with 48: address already in use

I'm trying to start nginx on my Mac OS X using the command sudo nginx It fails with the following error nginx: [emerg] bind() to 0.0.0.0:8080 failed (48: Address already in use) nginx: [emerg] ...
0
votes
1answer
22 views

Nginx load balancer and Tomcat startup delay

I am using nginx (free version on centos) as a reverse proxying load balancer to a cluster of Tomcat 7 servers. It works great except for the time when tomcat is starting. If a Tomcat instance is ...
0
votes
0answers
6 views

Virtual Host Redirects and Packet Flow [migrated]

If I set up a virtual host in nginx, will all packets flow through that PC? Here is what is going on. I have an openwrt NAT router with two devices behind it, a server and a raspberry pi. I want both ...
0
votes
1answer
24 views

nginx + php-fpm + v8js crashing

I have a problem concerning v8js extension for php. I needed to install it on my server (and did) (CentOS 6.5, Nginx 1.0.15, php 5.5.12) but whenever I give such a simple test to it: ...
0
votes
0answers
39 views

Nginx server goes down when php file is executed in command line

We have a production nginx web server with php FPM. We ran a php script which updates a particular field in mysql database and mails some content using php mail function. This php script was executed ...
1
vote
1answer
36 views

File descriptor limit in nginx/Passenger app

We're running a Rails app in Passenger 4.0.45 and nginx 1.6.0 (installed by Passenger installer) running on Ubuntu 14.04. Under heavy load Passenger restarts all of the application processes. After ...
0
votes
0answers
30 views

Can't access the DELETE method on nginx

I have run into a strange issue with my server setup. I have nginx installed with php-fastcgi and MySQL. I am using Slim Framework for running my website. For some reason, the DELETE method does not ...
0
votes
1answer
32 views

Howto rewrite URLs with two nginx as reverse proxies to gunicorn/Django

I have a Django application, deployed with gunicorn on port 8000, on a VM with a backend nginx, port 80, on the same VM. The nginx config is: location / { proxy_http_version 1.1; ...
0
votes
3answers
36 views

nginx rewrite location not found

in Nginx config file, did set rewrite location like below but do not work and every time return 404 not found, what is the problem here? server { listen 80; server_name mydomain.com ...
-1
votes
1answer
15 views

nginx rate limitinf unknown directive

I'm trying to set up a rate limit for bots using my website, but if i add limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; or anything of the sort to /etc/nginx/nginx.conf in the http ...
0
votes
3answers
34 views

How to remove hypen (-) using nginx rewrite rule?

I am using this rewrite rule to redirect example.com/a-b-c?id=learn-more ----> http://example.com/abc?id=learnmore rewrite ^/a-b-c?id=learn-More http://example.com/abc?id=learnMore permanent But ...
0
votes
1answer
24 views

Nginx, charset directive not working when sending 301 redirect

I have set the charset to 'utf-8' in the nginx.conf file under the http directive. It looks like this: http { charset utf-8; } I have two server directives. One for example.com, and one for ...
1
vote
1answer
20 views

Nginx HTML content while redirect

When the redirection is configured in nginx, the response contains: <html>[CRLF] <head><title>301 Moved Permanently</title></head>[CRLF] <body ...
0
votes
1answer
24 views

Restricting multiple directories to same IP ranges

Suppose I have the following in an nginx configuration file: location ^~ /foo/ { allow 1.2.3.4; allow 5.6.7.8; allow 9.10.11.12; … allow 99.100.101.102; deny all; # rest ...
0
votes
0answers
18 views

nginx and expire header not working

this is my nginx config location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 1y; add_header Pragma public; add_header Cache-Control "public"; try_files $uri $uri/ /$1/$2 =404; ...
0
votes
0answers
20 views

Wordpress PHP half works on nginx

under the path there are public files: $/usr/share/nginx/html 50x.html readme.html wp-content wp-mail.php apc.php wp-activate.php wp-cron.php wp-settings.php ...
1
vote
0answers
34 views

nginx add_header is not working

I'm using nginx-1.7.0 on windows 7. I am trying to use add_header to get to a json file I have residing in /data/TESTFOLDER. This is what my location block looks like: location ...
1
vote
2answers
48 views

Increase PHP-FPM's max upload/post size

I'm running php5-fpm under Nginx on Ubuntu 14.04. I want to increase the max upload size. I have edited my /etc/php5/fpm/php.ini to have the following lines defined as below: upload_max_filesize = ...
0
votes
0answers
22 views

In NGiNX my try_files is trying to get a php file in the wrong place

Here is a sample of my configs: root /usr/local/html/website/public/; location ~* auth/v1/* { try_files /auth.php?$args $uri/; } # location = /auth {return 301 ...
0
votes
0answers
35 views

Nginx error: “File not found”…coming from someone else's domain

I set up nginx to serve from an Ubuntu EC2 instance a few days ago, and today I checked the error logs when I encountered 504 after 504 in the browser. I found the following in my error.log: ... ...
0
votes
0answers
15 views

Nginx/PHP-FPM: Returning 404s for CSS and JS

I can't access PHP files placed in sub-directories and my CSS/JS files return a 404 in browser. Yes, I have seen many others experiencing a 404 issue but their fixes don't seem to be my solution. I've ...
-1
votes
1answer
33 views

pagespeed on apache with nginx as reverse proxy

I have a VPS and using the following stack: NGINX as front-end proxy on port 80. Also port 443 for SSL Apache on 8080 for dynamic content (mostly PHP) Now, I want to use PageSpeed module by Google. ...
2
votes
1answer
21 views

Nginx throws 404 only on php scripts using php-fpm

I've installed a testing server using nginx + php-fpm. I've tried all of the following: Nginx + Php5-fpm not rendering php files nginx + php fpm -> 404 php pages - file not found When accessing ...
-1
votes
0answers
56 views

Reduce Nginx's response times

I'm running a VPS with 1GB with Debian 7. Nginx's response time for static HTML files are around 300-500ms, which seems relatively high, because other static files (CSS/JS) are served in 75-125ms. Is ...
1
vote
0answers
16 views

Turn on/off proxy pass in nginx if a particular header is set

For testing purposes (in particular I'm developing a performance analyzer for a website that currently runs in production) I need to have some endpoints (es: /performance) that should be processed by ...