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

1
vote
1answer
40 views

nginx 404 instead of 403 for empty directory

I have the following config for my nginx server: server { listen 80 default_server; server_name example.com www.example.com; root /var/www/example.com/web; index index.php ...
1
vote
1answer
37 views

<head/> in sitemap after moving from apache to nginx

I have a sitemap named http://www.domain.com/sitemap1.php. It starts with this code: <?php echo '<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" ...
0
votes
0answers
19 views

How can I configure what to cache in nginx?

I have a REST API for which I'm using nginx as a reverse proxy. I want to cache certain calls to the API which use absolute time references in the request but I want to not cache calls which use ...
1
vote
1answer
33 views

High volume low overhead requests

I have an application that will process data it receives through high volume, low overhead requests sent from different internet-enabled hardware devices. These data will be received continually and ...
1
vote
1answer
33 views

Show real server name in nginx logs and params passed to fastcgi?

I have configured my nginx vhosts with a regex in server_name. nginx shows the raw regex in logs and in params passed to php-fpm (I know there's $_SERVER['HTTP_HOST'] with a real value, that's not an ...
0
votes
2answers
23 views

Using a variable in an upstream declaration?

Is it possible to use a variable in an nginx upstream directive? upstream appserver { server unix:/socks/$host.sock } I've search my little heart out and can't find the answer. A) Is it ...
0
votes
1answer
37 views

Nginx proxy_cache_purge alternative - get file out of cache

I seems that the proxy_cache_purge directive is supported only in the commercial nginx version. Is there an alternative way I could get a file/path/key out of the cache? Below my sample proxy_pass ...
-1
votes
1answer
37 views

Hot redirect http/https request coming to port 80 to a internal tomcat server on 8080 [closed]

I have a production server with a domain name. It has a tomcat server on 8080. It has several web applications. So I want to map the http/https requests coming to that server to these web ...
0
votes
0answers
14 views

How can I create a proxy for navigating on the web? [duplicate]

Here is my config: server { listen 80; server_name www.bob.com; location / { resolver 8.8.8.8; proxy_pass http://$http_host$uri$is_args$args; } } For ...
0
votes
1answer
26 views

Use hostname for set_real_ip_from in Nginx

How to use hostname and not directly IP for set_real_ip_from in Nginx? I have a reverse proxy which can change IP as it is restated (it is a Docker container), but I do not want to trust other IPs ...
0
votes
1answer
35 views

Using nginx to access internet through intranet

I don't know if I am going about this in the right way, but here's what I need to do. I have a website that's available on the internet. But I have some users who only have access to the intranet. I ...
1
vote
1answer
36 views

Nginx not redirecting but is working

This is my first setup with nginx and I'm using it to proxy to nodejs. HTTP is on port 3000, and HTTPS is on port 3001. If I go to http://test.domain.com it loads the regular unsecure pages. If I go ...
0
votes
1answer
31 views

redirect to url only if the destination url is valid

I have a redirect rule setup like this #redirect old phpbb links to xenforo links if ( $arg_p ) { rewrite ^\/forum\/viewtopic\.php /forum/posts/$arg_p/? permanent; } Which it will send a 301 to ...
0
votes
0answers
23 views

Passenger permission error

I have a strange permission error when I am trying to start a rails application on passenger/nginx webserver. Here is the error log. Can anyone enlighten me whats wrong? [ 2014-07-01 18:31:01.1992 ...
-1
votes
1answer
37 views

Installing nginx + php-fpm - got Not found

I install nginx and php-fpm on new machine. But when i open my domain, i got an 404 Not Found. (static files accessible). File: /etc/nginx/sites-available/elfchat.net server { ...
0
votes
1answer
49 views

Update Cache-Control max-age when srcache returns response from cache

I have configured Nginx to use srcache (along with the redis and redis2 modules). Server-side caching works great. My application responds with the appropriate Expires and Cache-Control headers, and ...
0
votes
1answer
27 views

Can I use the Nginx PageSpeed module together with SSI?

Is it possible to use the Nginx PageSpeed module together with SSI? I can't get SSI up and running when PageSpeed is enabled. But as soon as I disable PageSpeed, SSI works again: location ~ ...
0
votes
1answer
56 views

Nginx, second subdomain not working

I used the CNAME wild card DNS entry like: @ IN A ip.add.re.ss www IN CNAME @ * IN CNAME @ My root domain.com and sub1.domain.com are accessible (on the same digitalocean ...
-3
votes
2answers
40 views

Nginx port redirection on Ubuntu [closed]

I'm new to nginx and i would like to make a port forward from a given server to another. The idea is I connect to the server xxx.xx.xx.xx on the port say 46 and then it redirects me to a server ...
1
vote
1answer
31 views

Nginx Map Directive for multiple variables

I currently use nginx with Magento and I use the map directive to supply the store code like this: map $http_host $magecode { www.store.com retail_store; wholesale.store.com ...
-3
votes
1answer
73 views

Bjoern is 4x faster than Nginx - how to tweak Nginx to handle Bjoern proxy_requests without performance loss? [closed]

I was trying to put Bjoern behind Nginx for easy load-balancing and DoS/DDoS attack mitigation. To my dismay I not only discovered that it drops connections like chips (it varies between 20% and 50% ...
1
vote
3answers
123 views

What is the Ideal value for Worker Processes in Nginx Config?

I have 31GB RAM 8 Core Web Server with current load of 3k per min. Currently worker_processes parameter in nginx config is 4 which as per my understanding means only 4 cores would be used. But when I ...
1
vote
2answers
54 views

Nginx block for multiple domains to redirect all traffic to https?

I have a web server running nginx 1.6 with one IP address and hosting www.domainname.com as well as dev.domainname.com. I'm trying to find a smart way to route all http traffic to https and I want to ...
1
vote
0answers
58 views

upstream timed out (110: Connection timed out) while connecting to upstream

I have my backend in France and one of my frontend servers is in Japan. This issue doesn't happen with any other of my frontends, only this Japan server, which already has about 2s latency from most ...
0
votes
1answer
131 views

502 Bad Gateway - Nginx, spawn-fcgi, WordPress

I host several sites on a CentOS VPS, and all was working fine until one of the WordPress sites on the server started returning a 502 Bad Gateway error. Other sites work fine. The WordPress site will ...
0
votes
0answers
39 views

Nginx + PHP-FPM fastcgi_cache bypass specific custom header?

Hi I am trying to setup Nginx with PHP-FPM and fastcgi_cache and know I can bypass and exclude specific cookies with map $http_cookie $no_cache { default 0; ~cookiename 1; } and then bypass and ...
0
votes
0answers
15 views

Nginx: Simple(r) solution to round robin rewrite URL; appending an identifier (for A/B testing)?

For A/B testing I'd like to alternately rewrite a URL and append an identifier as query string. Scenario: -> GET /path <- HTTP/1.1 302 Moved <- Location: /path?a [redirected request ...
0
votes
1answer
52 views

Inconsistent behavior with Nginx's auth_request_set and more_set_input_headers

I'm trying to use the auth_request module in conjunction with the more_set_input_headers to automatically login my users into web apps. Basically, it works like this: Users have some session cookie ...
0
votes
0answers
24 views

is nginx + php5-fpm sufficient for long polling?

On my web application, I need to implement live notifications. I use nginx with php5-fpm. Digging through php5-fpm's configuration, I found out that it has a limit on the number of php scripts that ...
-1
votes
0answers
20 views

Nginx replicate incoming post traffic to multiple servers [duplicate]

I have nginx loadbalancers accept Post data and send to application servers (Roundrobin) using fastcgi. Now, I would like to replicate traffic to different set of cluster. How do I do that in nginx?
0
votes
0answers
39 views

Nginx & Cakephp & another subfolder and Cloudflare application

I'm using nginx 1.6 and CakePhp 2.x At www.example.com/fasdwqe I see missing controller from Cakephp. But on www.example.com I am getting 504 gateway timeout from Cloudflare. I want to run another ...
0
votes
1answer
57 views

Updated php5-fpm, can't use socket anymore

Earlier today, I updated packages on one of my servers. One of those packages was an update to php5-fpm, which seems to have broken my ability to utilize unix:/var/run/php5-fpm.sock. Disclaimer: I ...
0
votes
0answers
36 views

How do I prevent direct access to a PHP file nginx?

In Apache I was able to do this: RewriteRule ^/sitemap.xml$ /sitemap.xml.php [L] RewriteRule ^/sitemap.xml.php$ /sitemap.xml [R=301,L] Which directed all requests to ...
1
vote
0answers
37 views

Where does cPanel, Apache, or Nginx log php script access?

Synopsis Earlier today a website went down due to some database issues. After some investigation I found out that some tables were missing data. In order for me to rule out "accidental deletion" by ...
0
votes
1answer
35 views

Nginx reverse proxy - requests still return port 80

I'm trying to use nginx as a proxy server for two weblogic servers. The ports on the weblogic are 23823 and 23824 and i want them both to be accessible from port 8888 and distinguished by context ...
0
votes
1answer
51 views

Nginx rewrite, from htaccess-files

I've got a PHP-project set up in this directory tree: project v1 app (project files) public index.php (controller of app) documentation php files examples php files With "project" being ...
1
vote
1answer
32 views

Lots of users, reverse proxys and problems with both

I have a somewhat unique situation that is making managing my vpns a bit of a pain, so I am trying to make it easier on me and my users, hope somenone can give me some ideas and/or alternatives. The ...
0
votes
0answers
37 views

Nginx & PHP: How to install / activate PDO

I have an nginx server with PHP running on Windows Server 2012 and I want to install Collabtive. This web-based project management software requires PDO to connect to a MySQL database. The ...
0
votes
0answers
30 views

Configure Nginx with multiple lxc containers, virtual hosts and subdomains

I want to use multiple (at least 3) lxc containers running Apache2 on port 80. I want to configure Nginx such that www.mydomain.com serves the content on the host machine while sub1.mydomain.com , ...
0
votes
0answers
48 views

Debain Nginx WebDAV upload permission denied

I'm running Debian Wheezy on Google Compute Engine with nginx and get permission errors when uploading files via webdav. What's causing this error? Please let me know if you need additional ...
1
vote
0answers
21 views

php5-fpm doesn't create sockets for pools

I'm going off of section 3.1 of http://www.howtoforge.com/php-fpm-nginx-security-in-shared-hosting-environments-debian-ubuntu . I have created a directory in /var/run which www-data:www-data has ...
0
votes
1answer
63 views

nginx reverse proxy with basic_auth - 404 Not found

I have an nginx server block to proxy_pass content from three servers: gitlab, Rshiny and static content from another nginx server block. All this works fine, until I try to add password protection to ...
0
votes
0answers
20 views

How to remove malware from Debian server? [duplicate]

We have one Debian server that is affected by a malware. It's adding some code to the .htaccess files in /var/www directory where all sites are stored. Here's the malicious code: RewriteEngine on ...
0
votes
0answers
25 views

Nginx, try_files not working

Have this situation set $static_root /home/.... set $folder ... location @vincent { proxy_pass http://vincent; } location ~* "/img/([a-z0-9\-]{2,5})/([a-z]{1,3})/([0-9]{1,2}\.jpg)" { set ...
0
votes
1answer
105 views

Nginx + php5-fpm + Symfony2 = “File not found.”

This is the site config based on official Symfony2 doc server { listen 80; server_name project.local; root /media/Storage/project/web; location / { # try to ...
0
votes
2answers
37 views

NGINX pretty urls: No input file specified

I've been struggling with a NGINX configuration. I've set up a development environment (local laptop) with a configuration supporting search engine friendly (SEF) urls, but the same configuration ...
0
votes
0answers
40 views

404 error with nginx and wordpress

My wordpress site has been working fine for sometime with nginx and wordpress. But for some reason it is now giving me a 404 error. I think this may be related to the quick-cache plugin which I ...
1
vote
2answers
44 views

using trailing slashes in nginx configuration

location /product { proxy_pass http://10.0.0.25:8080; } if I use my first location description for product folder, I should use http://mysdomain.com/product/ and I can not use ...
0
votes
1answer
23 views

Nginx block specific directory to one country

I'm using Nginx and GeoIP to block certain countries (to the whole site). Is it possible to block just one specific directory? This way: www.domain.com/ Everyone can access www.domain.com/ES ...
0
votes
1answer
40 views

Webmail is “Unable to make a secure connection to the server”

I am configuring a Ubuntu14/NGinX server and almost everything is up and running (phpmyadmin, ispconfig, etc). I installed Dovecot/Postfix/Squirelmail to establish a mailserver. I followed the ...