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
0answers
9 views

“No 'Access-Control-Allow-Origin' header is present” nginx even though it is in the configuration file

This has me going around in circles. Here's the setup: Ubuntu, running django rest framework and nginx. I am using the Wide-open CORS config for nginx, and posting the form data using basic ...
0
votes
2answers
18 views

If file does not exists, rewrite

If the user types www.mysite.com/foo.php, if the file foo exist the server respond with foo, but if the file does not exist, it needs to rewrite like this: www.mysite.com/url.php?url=foo.php Im ...
0
votes
1answer
14 views

Stop nginx reverse proxy from redirecting

There are several similar questions but I haven't been able to figure out how to fix my problem. I am running an instance of nginx on port 80 which acts as a reverse proxy for some other instances of ...
0
votes
1answer
10 views

Nginx - Cached Welcome page on domain

I have an interesting issue. So I installed nginx to try it out and now I'm regretting it. The initial setup wasn't bad, but once I removed nginx and rebuilt the server (it was a clean install to ...
1
vote
1answer
12 views

nginx - serve only with backend or 404, no static files in root

I am trying to serve all requests with the backend (uwsgi for flask in this case) and if the backend has no such path, nginx should return 404. Somehow I only can get the backend to take over when I ...
0
votes
0answers
9 views

Ubuntu 14.04 | Docker: security implications in run NginX in a container

I was surfing around Docker Hub to find the NginX built-in image and i noticed the example commands to run NginX as web server in a container. I wonder if this way, suggested on Docker Hub, to load ...
0
votes
0answers
20 views

mywebsite.com/wp-admin it redirects to /wp-login.php and displays “File not found”

On mywebsite.com, I have running docker container with wordpress. I started it as docker run -p 8000:80 --name docker-wordpress-nginx -d and docker ps shows 0.0.0.0:8000->80/tcp and on my ...
0
votes
1answer
15 views

504 Gateway Time-out with PHP on nginx

I am trying to move a PHP Laravel application from my development computer running apache to a server running nginx. I have configured the database connection, and my Laravel app (mostly) responds ...
1
vote
2answers
22 views

Disable gzip for a specific directory

For training purposes I would like to deactivate gzip for a specific directory. The following config doesn't do the trick. How can I deactivate it? location /webperf/disabledgzip/ { gzip_disable ...
0
votes
0answers
13 views

Nginx websockets and location

I've been stuck for 2 days in a problem with nginx. This is working (dedicated vhost) : server { listen 80 default_server; root /var/www/; index index.php index.xhtml index.html; ...
0
votes
1answer
29 views

Nginx setting server gives installation page

I'm trying to set up Nginx for the first time and in following a tutorial I have come to the point that I'm getting the Welcome page to Nginx. I removed the last two includes in the ...
0
votes
1answer
18 views

Nginx 301 redirect if string is given

I would like to create a permanent redirect for specific querys inside my nginx server block. As example on my current url links to the php script have been: website.com/?hash=12345 So i need to ...
0
votes
1answer
18 views

get dev.domain.tld to rewrite to correct app with nginx

I have two node.js instances running behind nginx proxy I also have a rewrite rule to push everything to https. My issue is that I would like to split dev.domain.tld to go to the second node.js ...
0
votes
1answer
17 views

Nginx Configuration:504 Gateway Time-out error

We are using Nginx as a Load balancer. Nginx having IP address of :10.110.0.200 and address of host machines are 10.110.3.20|10.110.3.21 this is the configuration file: upstream test1 { server ...
0
votes
0answers
25 views

Fresh nginx installation: Starting nginx: nginx: [emerg] setsockopt(SO_REUSEPORT) 0.0.0.0:80 failed, ignored (92: Protocol not available) [on hold]

I have installed the latest stable version of centmin mod which is 123.08stable, everything went smooth with installation, when it's done and tried to start nginx it gives the mentioned error: ...
0
votes
1answer
27 views

How to configure nginx to add a query parameter only when the requested uri is / and the specific query parameter doesn't already exist?

Suppose the query parameter I'm interested in is arg1=val1. I would like nginx to add the query parameter only when the requested uri is / and the query parameter arg1 doesn't already exist. ...
0
votes
0answers
5 views

Uwsgi Fallback Strategies

I'm giving some thought to application redundancy, and I was wondering what the best-practices are for improved reliability using uwsgi fallback features. Specifically, I had two thoughts: 1) We ...
3
votes
0answers
37 views

why is partial content not being served in nginx (mp4)?

i am running nginx v.1.9.3 here to serve my site and also video files for streaming. i am seeing that the mp4 files are always served with a code of 200 and that partial content requests are ignored. ...
0
votes
1answer
37 views

What is my nginx + php server bottleneck?

I am running some siege tests on my nginx server. The bottleneck doesn't seem to be cpu or memory so what is it? I try to do this on my macbook: sudo siege -t 10s -c 500 server_ip/test.php The ...
0
votes
1answer
9 views

Nginx try_files with name from query

'm trying to find way how to serve cached files with nginx. I have stored search results to json file in shared memory. Next time when user tries to look up the same search, it supposed to be served ...
0
votes
1answer
27 views

How make SEO friendly url without .php

I want to use SEO friendly url`s like site.com/page So i looking for a (nginx) rewrite to change /page.php to /page. My server is running Nginx + PHP-FPM 5.6 I also use images,js,css in the map ...
0
votes
1answer
20 views

nginx + apache return 404 error for only one domain

hi i am using directadmin and i setup nginx reverse proxy for apache everything works except that static file for only one domain returns 404 in nginx error log i see this 2015/08/02 10:34:27 ...
0
votes
1answer
18 views

Nginx rewrite issue with sub folder

I'm try to redirect an URL but nothings happen. :( The source URL example like this: http://example.com/download.php?shortURL=MJdcqV Where the MJdcqV is a variable parameter, all others constant. I ...
1
vote
1answer
25 views

Safari does not decompress gzip content when Content-Encoding is gzip,gzip

Safari for OSX, iOS, and Windows is having issues decompressing Gzip content on my server after a recent server overhaul. I moved from 1 server with Apache and PHP5-FPM to 3 servers. A load balancer ...
0
votes
0answers
11 views

Uwsgi “Permission denied” after “Gracefully killing worker”

I run python environment with uwsgi on old centos 6.6 (it necessary for customer). But often i get error 502. log of uwsgi with error: 1) Request to /show/12763 took 0.474370002747 seconds Request ...
-2
votes
1answer
18 views

Equivalent of .htaccess in NGINX

I have the following .htaccess file. I am trying to configure this on NGINX with no luck. .htaccess RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond ...
1
vote
1answer
13 views

Nginx - Redirect to different url if an image is directly access

I want to redirect users if they access the gif images directly. http://www.example.com/uploads/file.gif This should be redirected to home page or some other page. Or If the image is directly ...
0
votes
1answer
27 views

nginx proxy_pass and docker - I don't want port number in address bar

On mywebsite.com, I have running docker container with wordpress. I started it as docker run -p 8000:80 --name docker-wordpress-nginx -d and docker ps shows 0.0.0.0:8000->80/tcp and on my ...
0
votes
0answers
48 views

My VPS crash durring high traffic [on hold]

I m hosting my website on a VPS and during high traffic my server crashe and goes down until i restart both nginx and apache so i wanna know if it s the vps material or only the configuration VPS ...
0
votes
2answers
26 views

how to make NGINX read static files directory when proxy passing

Here is my nginx configuration: server { listen 80; server_name example.com; location /assets { root /var/www/frappe/sites/assets; try_files ...
0
votes
1answer
11 views

Getting rid of a directory in the URL in Nginx

I have been searching around for this answer, but I can't find the one that fits my situation. So currently I have a URL that looks like: http://localhost/templates/verify but I want it to look like ...
3
votes
2answers
40 views

Configuring SSL on Nginx Reverse Proxy for GitLab

I am having a small issue in my personal gitlab setup. I wanted to redirect all traffic that comes from http://gitlab.example.com to https://gitlab.example.com. SSL is indeed working on ...
1
vote
0answers
18 views

Social networks and Cloudflare free SSL

Let me expose my setup and problems. Maybe some of you will have ideas for me to test. Setup On Digital Ocean : I have one web server running a web site with NGINX in the front (Ruby on Rails ...
-3
votes
1answer
30 views

Run Python and Php under same server

I am trying to run python on main domain and a wordpress blog in sub-directory. Is it possible to do so? Currently the they are running good in sub-domains i.e http://main-domain.com and ...
0
votes
1answer
11 views

Nginx Server stopped working after installing ngx-pagespeed mod

I had NGINX running fine on my local machine and tried to install the Google Page Speed module by first uninstalling nginx and following the re-installing from source as Google suggests. Now NGINX ...
1
vote
0answers
18 views

nginx proxy_buffering and send response to client immediately

To break the question down to one sentence: Is it Possible to turn on proxy_buffering in nginx, but sending the response of the backend server immediately to the client when the client is fast enough ...
3
votes
0answers
20 views

nginx websocket reverse proxy keeps return 200 instead of 101

I'm currently trying to have a hack.chat on my personnal server working. For those who doesn't know this brilliant thing, check this https://github.com/AndrewBelt/hack.chat Long story short, it ...
0
votes
0answers
11 views

configure pf.conf to NAT http / https to docker container running nginx

I have setup FreeBSD 11-CURRENT runing docker in a jailed environment as per https://wiki.freebsd.org/Docker When trying to deploy NGINX as per ...
0
votes
1answer
14 views

nginx redirect localhost and subdomain

I am trying to put a development server in place on the same server as the production server. The two will run on different ports, and one will be accessible via prod.example.com and the other via ...
0
votes
1answer
17 views

Monit can't restart nginx

I've got monit up and running on an Ubuntu 12.04 server, to monitor nginx, but I can't get it to successfully start nginx up again. My setup is thus: the monit config file is: -rwx------ 1 root root ...
1
vote
0answers
23 views

nginx spam 404 errors

My server is spammed by multiples XXX domains, there is a lot of 404 errors in my logs and i can't find the solution to stop that. 2015/07/31 09:13:20 [error] 7070#0: *610 open() ...
0
votes
1answer
62 views

Is there a cloud-based reverse proxy solution in AWS?

The system I have an API deployed on EC2 machines on AWS. Incoming HTTPS requests are passed to an elastic load balancer. The load balancer handles the SSL, and passes the request to an Nginx ...
1
vote
0answers
25 views

Nginx cant write in folder

I cant get wordpress to write on wp-content. According to my nginx.conf: user www-data; Then I just did: chown -R www-data /var/www/blog/wp-content And check everything was correct: ...
0
votes
0answers
8 views

How deploy api loopback to nginx server [closed]

How deploy in url: api.example.com/api-1/ from my git repositories ssh://git@example.com:7777/home/git/api-1/ It is my nginx config: server { listen 80; access_log ...
0
votes
1answer
18 views

nginx geoip redirect for first time only leads to redirect loop

I'm trying to configure nginx to perform geoIP checks on first-time visitors only. The idea is that first-time visitors should be redirected to the page version which has been customised for their ...
0
votes
0answers
15 views

Perl scripts stopped working after Debian 8.1 upgrade

I am currently playing around on my dev server, to try and get it running the latest Debian (Jessie). I've got it all upgraded using this tutorial: ...
0
votes
0answers
9 views

nginx continually returns 503, even after the server it's proxying recovers

I have nginx proxying a different service using proxy_pass. The backend service will ocassionally crash (i.e. the process stops). When this happens, nginx understandably returns a 503. But I have ...
0
votes
1answer
31 views

Switching from nginx to apache with wordpress

I have recently switched from nginx to apache. Everithing went fine since i checked out my wordpress website. The homepage is going well, and also the admin area, but subpages with permalinks ...
0
votes
0answers
19 views

Nginx fails to load static after putting caching configuration

I am trying to implement leverage browser caching for nginx. But when i insert the code inside conf file static files are not served by nginx showing 403 permission denied error. This is my conf file ...
0
votes
0answers
17 views

Many php-fpm processes created and they do not go away

I have PHP (5.5) using Laravel framework on NGINX with PHP-FPM. Here is what I do. I have a script myscript.php <?php while(true) { @file_get_contents('http://myserver.com/api/data'); } ...