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
91 views

Kibana4 + nginx reverse proxy using location /kibana4/ = Not Found 404

I'm trying to setup Kibana4 with nginx reverse proxy, with partial success so far. Here is my config related to Kibana: server { listen 82; server_name ${HOSTNAME}; set $kibana kibana.docker; ...
0
votes
0answers
38 views

X Forwarded For Showing Origin IP

My X-Forwarded-For header is showing my origin IP. I am routing traffic via Cloudflare and I know it's touchy with that header. I changed it to MYNAME-Forwarded-For just to check and it still shows ...
0
votes
1answer
37 views

Nginx: location regex not working

i'm getting trouble with my regex don't know what is wrong with it. it's returning a URi with orls/f instead of orls/f?p=4550. When i pass https://secure.toto02.com/orls/myservice/f?p=4550 my conf ...
0
votes
0answers
51 views

Bad Gateway - NGINX Load Balancer Cloudflare

I have configured an NGINX 'load-balancer' to sit in front of my site. Right now my backend consists of only one server, but I plan to add more to actually utilize the 'load-balancing' of NGINX. If I ...
0
votes
1answer
57 views

why django project failed loading? - django + nginx + uwsgi

I am trying to deploy a Django project through Nginx and uWSGI. If I run the project manually running python manage.py runserver :8000 it works fine, so the project itself is not the problem I guess. ...
0
votes
0answers
25 views

Varnish thrown 400 Bad Request nginx

Have two version of site e.g one is for india region i.e www.abc.com and another one is for US region i.e us.abc.com. From india if we try to access www.abc.com through OperaMini user agent site will ...
2
votes
1answer
29 views

Is there a way to get Nginx proxy_cache expiration time?

This is my nginx proxy_cache config: proxy_cache cache_one; location ~ \.(jpg|png|gif) { proxy_cache_valid 1d; } It's worked but I never know the images expiration time in any way I wanna add ...
0
votes
0answers
42 views

How Can I Enable CORS on NGINX?

I'm attempting to enable CORS on NGINX to get around Same Origin Policy for some Ajax. I've followed a few guides, but they aren't working. Here is my current nginx.conf and default.conf. What am I ...
0
votes
1answer
35 views

Syncing Digital Ocean VPSs behing NGINX Load Balancer

This is a higher level, i.e. I just need avenues to explore here, question. I'm trying to set up an NGINX load balancer, behind which sit two different NGINX VPSs. Neither of the backends is a ...
0
votes
0answers
51 views

502 Bad Gateway from relocated instance on AWS EC2

I tried to move some instance from tokio region (which by the way, it's working normally) to sao paulo region, then I followed this basic steps to perform but when I launch the instance from the ...
0
votes
0answers
29 views

Configure Nginx to only allow specified hosts

I am running a Django Project on DigitalOcean (using Nginx, Gunicorn and Postgres), and I have specified the "allowed hosts" in the settings.py like this: ALLOWED_HOSTS = ['sub.domain.tld'] Based ...
0
votes
2answers
20 views

Forward any subdomain to single server

Having site example.com How can I configure Nginx zone file that every subdomain like test.example.com and so on would be forwarded to one server. Problem is that I do not know in advance possible ...
1
vote
1answer
40 views

Unable to upload a big file to server behind nginx as a reverse proxy

I use nginx as a reverse proxy. Behind it is coming apache hosing foo.com . In order to upload a big file, I set post_max_size = 20M and upload_max_filesize = 20M in php.ini . But I can't upload file ...
0
votes
0answers
20 views

Nginx fastcgi_cache hide Set-Cookie when serving from cache

I'm trying to use nginx fastcgi_cache to serve some pages from my site, it worked fine but I found that sessions were being duplicated to all the users because Set-Cookie was cached in the response. ...
1
vote
1answer
17 views

Understanding Stress Test Results

So I did a stress test on my Wordpress based website running on the cheapest Digital Ocean tier. I am using WP Super Cache for caching on the server end and Nginx as my web server. I am also using ...
0
votes
2answers
85 views

nginx redirect http to https not working

I am trying to reroute from http to https. For example you visit example.com and you will be automatically redirected to https://example.com. I tryed using this one: server { listen ...
-1
votes
0answers
24 views

Nginx status page works on one machine, but not on another

I have several servers, and I'm trying to configure an Nginx status page on each. In my nginx.conf, I have the following: http { [...] server { location /nginx_status { ...
1
vote
2answers
95 views

Catch upstream down (502) errors and display custom error page

This question should have been answered a longtime ago, but I can't seem to figure it out despite reading many common answers, can someone please point out why my configuration isn't working? Goal: ...
0
votes
1answer
20 views

proxy_pass to specified server port and directory

I want mysite.com/* to display content from 127.0.0.1:8080/dir/*. What I have that is currently 1:1 mysite.com/* to 127.0.0.1:8080/*. sites-enabled/mysite.com.conf: server { listen 80; ...
-2
votes
1answer
32 views

Make user have same UID as PHP?

I'm running a web app in a FreeBSD jail. Nginx and PHP are configured as user:group www:www. I have a chrooted SFTP user who also is in the group www. (SFTPuser:www) My goal is that the files that I ...
-1
votes
0answers
14 views

Serve different directory based on url segment in nginx

Nginx is serving /var/sites/sub.example.com for server_name *.example.com. This means myaccount.example.com loads my single page application front-end. myaccount.example.com/foo ...
0
votes
1answer
50 views

Nginx + Tomcat virtual hosts

I need to configure Nginx as a reverse proxy for Tomcat. The problem is when I try to access the web application through a subdomain (myapp.domain.com), in this case is displayed Tomcat webapps root, ...
1
vote
2answers
36 views

nginx: setup a webmail for every domain (wildcard domain?)

I would like to setup a webmail mail. subdomain for every domain I have on my server, using nginx. It seems to work on https://mail.mydomain.com but I can also access the webmail by visiting the ...
-1
votes
0answers
27 views

Error with Ubuntu Server involving Nginx/ Unicgorn/ Django

I have a Django website hosted with DigitalOcean. After a restart, I'm unable to access it. Trying to access the IP returns a 502 error: 502 Bad Gateway nginx 1.4.6 (Ubuntu) Nginx Error Log ...
0
votes
0answers
37 views

Strange issue with nginx proxy upstream and ssh port forwarding

We were using nginx legacy till now, but we upgraded our system to 1.6.2 recently. We have a port forwarding of ssh as well as load balanced nginx server for two separate internal servers. The ...
1
vote
1answer
43 views

can't use mail() on nginx but can send mail on console using msmtp

I setup msmtp on my centos 6, i know its working fine because I can send email using bash command: echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" |msmtp --debug --from=default -t ...
0
votes
1answer
77 views

(bad) nginx + php-fpm optimization (done by our provider) review

I asked our hosting provider for nginx + php-fpm optimization on our managed server. I got this answer: Hi, There isn't much optimisation that can be done within Nginx as it is threaded and ...
0
votes
1answer
43 views

Nginx error page static content not loaded

Running Nginx 1.4.1 I have the following config to display a custom error page in case my backend messes up. The page is displayed but custom fonts & images are not loaded. My custom error page ...
1
vote
1answer
63 views

Why is Apache 2.4.7 in ab tests just as fast as NginX 1.4.6?

Im very confused right now... I've always used Nginx to serve up static files and pass off php to Apache. I built a new box 4GB Ram, installed Apache 2.4.7 with mpm_prefork module and NginX 1.4.6. ...
0
votes
0answers
49 views

What is the difference between setting the environment variables in these 2 ways?

For a project I'm working on, we require nginx and lua, and we start it like this: MYVAR1=some_value MYVAR2=some_value /usr/local/openresty/nginx/sbin/nginx -p `pwd`/ -c nginx.conf And everything ...
1
vote
2answers
49 views

Put nginx in maintenance mode for certain IPs

Because of the way if statements work in nginx (no nesting, no multiple conditions) I can't figure out a way to combine these two features: Using the nginx Geo module I have a list of allowed ips ...
0
votes
1answer
37 views

How to make nginx return 404 on empty files?

I am looking to see if it is possible to do a conditional rewrite based on the file size. Something like: if (!-s $request_filename) { return 404; } I'm assuming -s returns true if the file ...
0
votes
0answers
105 views

Error: No 'Access-Control-Allow-Origin' header is present on the requested resource. (NGINX)

I am using NGINX and I am receiving that error in the browser's console. I am so frustrated. According to my boss, I need to set up cors which what I did and still I am getting the same error. This ...
-2
votes
0answers
11 views

nginx ssl server rewrite request to external url to be http

I have an nginx server configured as a reverse proxy with SSL offloading. The server name is example.com Everything works fine, but there is a form in the webpage that needs to post to an external ...
0
votes
0answers
22 views

Sometimes for Some users 404 Not Found Nginx + PHP-FPM

Sometimes (Not Always) , I Get Nginx 404 not found message on my site. Unfortunately there are no logs written about it neither in php-fpm or in nginx error logs. Can it be due to caching ? I am ...
0
votes
0answers
26 views

roundcube 0.9.5 - installed from Ubuntu package

If installing roundcube in Ubuntu 14.04 LTS, version 0.9.5 is downloaded. The files are copied to /var/lib/roundcube/ and /usr/share/roundcube, the database is set up. As I'm using nginx as webserver, ...
6
votes
1answer
149 views

Why is my web server dropping connections with a TCP reset at high load?

I have a small VPS setup with nginx. I want to squeeze as much performance as possible out of it, so I've been experimenting with optimization and load testing. I'm using Blitz.io to do load testing ...
1
vote
0answers
36 views

Nginx proxy_cache / Varnish - parallel requests trigger multiple requests to backend?

I am looking for a HTTP reverse proxy that will handle HTTP live streaming use cases in a performant manner. Assume file/fragment sizes up to 4MB with a constant load of client requests for the same ...
0
votes
0answers
12 views

Dynamic content, what is the best web server combination? (Software wise not Hardware) [duplicate]

We developed a mobile game for smartphones and it uses a http php website as a backend. Sometimes we even have 14000 people playing at the same time, at 12000 it is already noticeable slow and web ...
-1
votes
2answers
119 views

What should I do to know if SSL is working? [closed]

I am working with NGINX, I just set up a domain and subdomain where I need to have SSL on both. Look at the server block for the subdomain server { listen 80; listen 443 ssl; server_name ...
2
votes
0answers
19 views

Nginx: Tags in Syslog output on wrong position

I'm trying to output the logs of several Nginx servers in FreeBSD jails to the jails' host. I'm using FreeBSD 10 syslog and Nginx 1.7.10. In Nginx (in this case the hostname is web) I have set: ...
1
vote
0answers
47 views

Rails + Nginx + Unicorn increase post data size ( 414 Request-URI Too Large)

I get 414 (Request-URI Too Large) exception on my POST Request while sending bulk date to my server. Is it possible to increase the limit of POST data? I have done following change in nginx ...
0
votes
0answers
20 views

Nginx cache gziped results on reverse proxy

I have been trying to figure out how I could set my reverse proxy to cache gziped results. What I am trying to achieve is following: Client requests for JS/css -> Reverse proxy requests it from ...
1
vote
1answer
26 views

Nginx redirect is causing issues

I've got a problem that I hope is simple. I have a wordpress plug in that produces a link to a picture when a user chooses to share it. I have discovered that the link is properly formed and should ...
0
votes
1answer
42 views

Unable to successfully enter to a subdomain

I have a little issue here trying to enter to a subdomain, I would like you to get me clear about the command line I am using because actually it got me confused. server block for domain listen ...
1
vote
0answers
29 views

nginx location not responding to pathnames

I've set up my site file but for whatever reason the alias isn't working. The site is an internal site and all media files are kept on a NAS off of the server. I'm trying to access them using /video/ ...
0
votes
0answers
20 views

Extra certs issue with Nginx SSL config

It seems that I've set up my SSL wrong. SSL labs gives me the following: https://www.ssllabs.com/ssltest/analyze.html?d=pitot.io&hideResults=on The issue in question is "extra certs". This ...
1
vote
1answer
29 views

Content-Security-Policy issues (NGINX)

I am working with NGINX and I have a couple issues here. I have a domain and one subdomain Server block for domain listen 80; server_name just4bettors.mobi www.just4bettors.mobi; root ...
0
votes
1answer
40 views

Nginx PHP-FPM stops after connection timeout

I have a server with Nginx and PHP-FPM for a single web application. Everything works will until I make a request for a page that takes over the 60 seconds allowed. Then PHP stops responding to any ...
2
votes
1answer
201 views

Can't access domain internally via public IP address [duplicate]

I have a dedicated server running Proxmox and a VM inside Proxmox running Debian 7 (Wheezy). As I only have one IP address, I'm using iptables to forward ports to the VM. My ...