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

1
vote
0answers
104 views

No Module Named OS - NGINX/UWSGI/NGINX

Have looked at many related posts and most point to an outdated version of python that is cause the 'no module named os' during the uwsgi boot. I've run print sys.version_info And it shows python ...
1
vote
0answers
51 views

nginx - redirect https://subdomain.example.com to https://example.com

I want to redirect https://subdomain.example.com to https://example.com. Here's what I'm trying: server { listen 443 ssl; server_name subdomain.example.com; return 301 ...
1
vote
0answers
213 views

Gitlab Omnibus, can't view most commits (500) and very slow

I'm running GitLab 7.9.2 c46d4f5 (Omnibus) on Ubuntu 14.04 On a little over half of our commits when someone navigates to a commit gitlab returns 500 We're sorry, but something went wrong Also, on ...
1
vote
0answers
69 views

Correct nginx set up to handle subdomains

I have an nginx instance with the following config: server { listen 80; server_name mySite.com; location / { root /usr/share/nginx/html; index index.html index.htm; ...
1
vote
0answers
555 views

Nginx as s3 proxy with private buckets

I'm trying to set up Nginx as a proxy for a static html/js webapp hosted on S3. I read a lots of tutorials and posts and I could make it work if my bucket is set as public. The reason I need Nginx as ...
1
vote
0answers
49 views

Nginx, wrong site served

I have my site on the IP 1.2.3.4 On my domain provider I have both onesite.com and anothersite.com pointing to 1.2.3.4 With Nginx, I have two sites configured: server { listen 1.2.3.4:80; ...
1
vote
0answers
195 views

Scaling AngularJS + NodeJS app on Linode

I have developed an application using AngularJS + NodeJS (together with MariaDB, Redis and Socket.io for realtime notifications) and I have deployed it on a single Linode node. Now I would like to ...
1
vote
0answers
50 views

Nginx proxy to tomcat7 webapp secured with shiro

So I have a Java (Spring 4 + Shiro) web app running in Tomcat7 on dedicated server. I'm trying to configure Nginx so that my application would be reachable by simply going to www.example.com instead ...
1
vote
0answers
509 views

How to override “Content-Type” header with PHP script on Nginx

I have some php script which returns jpeg image(1x1 pixel) with content type "image/jpeg": // return image $image_name = 'img/pixel.jpg'; $image = fopen($image_name, 'rb'); header('Content-Length: ' ...
1
vote
0answers
52 views

How to correctly secure Reverse Proxy communication with actual server in LAN

I have Nginx acting as gateway and reverse proxy for requests based on host name. However, the communication with the actual server in lan isn't secured. Does the connection remain encrypted with ...
1
vote
0answers
651 views

High CPU Usage and hangs randomly with HHVM

I'm using phpbb on Centos 7 with 512mb of ram and 1 core. And I'm having randomly hangs and high cpu usage when I get some url of my clean phpbb installation. This is my server.hdf file: idFile = ...
1
vote
0answers
541 views

nginx relative path to include

In an nginx conf file, is there any way to specify the include to another conf file relative to the current conf file? I would like to write: server { listen 80; server_name localhost; ...
1
vote
0answers
96 views

Nginx req_limit_zone whitelist ip's geo module

I have setup nginx req_limit_zone to limit requests to my webserver. Also I added geo to whitelist certain IP's so request limit does not affect those IP's. The problem is that once I test it with ap ...
1
vote
0answers
350 views

Django / uWSGI - Nginx giving 502 status code: error.log says “Permission Denied”

I'm trying to setup my Django app to use uWSGI and Nginx. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html I'm on the "Using Unix sockets ...
1
vote
0answers
419 views

Django uwsgi Nginx not serving media files - Django returns 404 status code

I originally posted this on SO but I think it might belong here instead. I'm following this tutorial: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html Everything was going ...
1
vote
0answers
221 views

Getting 403 Forbidden w. Referer on Nginx+Passenger

We're using Nginx 1.6.2 + Passenger 5.0.6 and have a vhost defined with PHP-FPM which serves a MODx installation. Only one location /sinatraapp serves a Sinatra App using Ruby 2.1.1. The setup is ...
1
vote
0answers
265 views

How to block fake google spider and fake web browser access?

Recently I found that someguys are trying to mirror my website. They are doing this in two ways: Pretend to be google spiders . Access logs are as following: 89.85.93.235 - - [05/May/2015:20:23:16 ...
1
vote
0answers
121 views

nginx: Use geo module with allow/deny directives

Reading nginx's ngx_http_access_module's documentation, I came across this: In case of a lot of rules, the use of the ngx_http_geo_module module variables is preferable. How can I use allow/deny ...
1
vote
0answers
196 views

Varnish keeps getting MISS when Nginx is backend server

I am experiencing a really weird situation where Varnish works fine with hitting directly to application server (Play server), but not working with Nginx as web sever. Working: Varnish:6081 => ...
1
vote
0answers
650 views

Change Nginx document root from /usr/share/nginx to /etc/nginx

I've tried many things, STFW, RTFM but I still have this problem. The thing is: I have a Nnginx installed in an AWS machine (other fella installed it, not me) and I MUST serve several virtual hosts ...
1
vote
0answers
325 views

Nginx Varnish 4.0 SSL Wordpress configuration redirects mydomain.tld to https://127.0.0.1

I have the following stack: (redirect http to https =>) https nginx -> varnish -> nginx http -> php5-fpm When I open my.url.com I get instantly redirected to https://127.0.0.1 Without varnish, ...
1
vote
0answers
165 views

Nginx, reverse proxy and caching only some of the routes

I have a RESTful API running in the UK but somehow it's so slow for AU users. So what I would like to do, put an nginx proxy on a AU server and cache some of the routes for 1, 10 and 60 mins and don't ...
1
vote
0answers
68 views

lighttpd: Translate nginx try_files to lighttpd

I'm struggling while translating the following nginx rule to lighttpd: try_files $1 $uri $uri/ /abcdefg/index.php$is_args$args; Can someone explain me, how this would look like in lighttpd? Thank ...
1
vote
0answers
173 views

Accessing Apache page using NGINX after custom authentication

I am using ubuntu 14.04, In which apache is running on port :8080 and Nginx is running on port :80 I am using following code to access apache pages using nginx with my own login page for ...
1
vote
0answers
91 views

Special nginx hotlink protection conversion from Apache .htaccess rule

I have the following anti-leeching rewrite rule in Apache, which i'd like to have in nginx. I see cookie or referrer rule examples. But none combining both, so I am not sure how to go about this. ...
1
vote
0answers
324 views

NGINX / PHP-FPM: Ajax slow first request, good next ones

The CMS is Elxis, which comes from a variant of Joomla (PHP). The server is running nGinx with PHP-FPM All requests get logged and executed, eventually, B U T!!! When firing a specific request via ...
1
vote
0answers
57 views

How to make nginx wait while proxied app is loading, like Heroku?

We've moved from Heroku to self-hosting for various reasons. One aspect of Heroku that I've not yet been able to reproduce though, is when our app is restarted, the site immediately starts giving ...
1
vote
0answers
384 views

CentOS 7: Nginx systemctl hangs on start, why?

I compiled nginx with pagespeed and made the nginx.service file in /usr/lib/systemd/system/nginx.service but when i try to do systemctl start nginx it just hangs, nginx does start but systemctl hangs. ...
1
vote
0answers
339 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 ...
1
vote
0answers
119 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 ...
1
vote
0answers
119 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/ ...
1
vote
0answers
32 views

How do I configure nginx to have a server block pointing towards a django app?

Suppose I have an nginx server, with Django apps set up as "/djangoapps/exampleapp1/" and "/djangoapps/exampleapp2/". Suppose I just registered a domain "www.exampleapp2.com". How can I point ...
1
vote
0answers
33 views

Nginx user uploaded SSL Certificates

I'm wondering what's the best way to let users upload their SSL certificates. I have a multitenant application based on rails/passenger/nginx and I need each user to use his own domain with his SSL ...
1
vote
0answers
343 views

Nginx (+Varnish) adds port 8080 to url when accessing url without slash

I am running Nginx with Varnish on Ubuntu 14. If I access a url without a slash on my test server (http://example.com/history), the page load fails and I get (http://example.com:8080/history/) ...
1
vote
0answers
129 views

nginx: Redirection from http://*.example.com to https://example.com showing strange behaviour

I have an SSL certificate being only valid for example.com (not valid for subdomains) and therefore want to redirect both http://example.com and http://www.example.com to https://example.com using ...
1
vote
0answers
184 views

How to block hping3 SYN ACK efficiently with iptables?

Actually I'm trying to execute a SYN TCP flood on my Debian web server with nginx and, by executing tcpdump "tcp[tcpflags] & (tcp-syn) != 0" while flooding, I see all packets coming. I already ...
1
vote
0answers
35 views

Can NGINX instructed to serve a file over HTTP that is in the process of being created?

I am using NGINX as a component in my system that accepts content streamed from clients (lets say, over RTMP) and passes it to some internal service for processing. The internal service fetches the ...
1
vote
0answers
289 views

Nginx reverse proxy from subdomains to ports

This is my entire nginx.conf file worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile ...
1
vote
0answers
205 views

proxy parameters with nginx

I'm trying to use nginx to proxy a request with parameters to a shoutcast stream. I've tried a couple things but can't seem to get it working right. First try was this location /music/ { ...
1
vote
0answers
243 views

Max memory for HHVM instance on vServer

Im tried hhvm on my vServer and have problems with the memory used. The performance is great, but the used memory consumption is horrible. I have a vServer with min 4GB and max 8GB memory and hhvm ...
1
vote
0answers
199 views

Rate limiting bots (specific IPs) in NGINX

I would like to rate-limit (but not block) various crawlers. Based on other examples of similar questions, I've come up with this: http { ## 10MB zone, 5 reqs per sec limit_req_zone $limit ...
1
vote
0answers
359 views

Artifactory behind Nginx without directory /artifactory in the url

On our old server (hosted), Artifactory was running behind an Apache proxy. The public url was http://repo.example.com/ Our hosting provider moved us to a new server. A new version of Artifactory ...
1
vote
0answers
93 views

Nginx Server break images on web browser after refreshed 3 to 4 times

Hi I am in very confusing state now. I have configured Nginx 1.6 on Centos 6 for serving only Code (js, css, html) pages all other images coming and calls happened through load balancer. My problem ...
1
vote
0answers
426 views

How to get Nginx to quickly switch to backup upstream server?

I've using Nginx to load-balance a websocket app that runs in multiple Node.js instances. When there are thousands of active connections, a single message broadcast could make Node spin in place for ...
1
vote
0answers
204 views

NGINX + NodeJS Performance Issues

I have one server running a Docker + NodeJS application and a load balancer running nginx. Before upgrading to two servers, I wanted to attempt to replicate traffic statistics for the load balancer ...
1
vote
0answers
195 views

Interpreting Siege results with Nginx

I am trying to compare the performance of a clutch of web servers using Siege. Whilst the results from all the other servers are easy to understand I am having some difficulty understanding the ...
1
vote
0answers
207 views

Configure nginx proxypass with node.js

What I'm trying to do is running a node.js app with nginx using the ProxyPass feature; my node.js app is execute at localhost:8888, and the this is my nginx configuration file server { listen ...
1
vote
0answers
31 views

How to route PHP files to 2 different backends with nginx

I have a server running Nginx that is currently proxying all PHP script to Apache with the following location directive: location ~ \.php$ { proxy_pass http://@apache; } I'd like to introduce a ...
1
vote
0answers
33 views

How do I troubleshoot a nginx 413 error?

I'm getting a 413 error on my laravel forge site using nginx. I updated php.ini for cli and ftp to 1000m and updated my nginx config for client_max_body_size = 1000m. Still getting that 413. The file ...
1
vote
0answers
226 views

Can't go to route using nginx and Express.JS

So I have express.js set up behind nginx and when I go to website.com/users, I get a 404. But when I go to website.com, the page loads fine. This appears to be all other routes too, I can't get to ...