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

2
votes
1answer
43 views

How to properly refuse ssl connections to subdomains that don't have a certificate

I'm currently setting up a (semi-serious) server with nginx for the first time. I have a couple of domains and subdomains and want to use SSL as much as possible to keep the traffic to and from my ...
0
votes
1answer
61 views

How to get nixos configuration.nix to configure nginx?

In my configuration.nix, it says services.nginx.enable=true; services.nginx.httpConfig="a"; (I tried a normal file and empty string and neither worked) upon running nixos-rebuild switch, it says ...
0
votes
1answer
55 views

Nginx only recognises files in root dir (Permission denied on symlink'ed dir/files)

UPDATE -- This is driving me nuts (or back to Apache...) The issue is definitely symlinks and permissions When I setup symlinks to directories in the same tree, for example /var/www/html/html2 --> /...
0
votes
1answer
41 views

Nginx upstream never flagged as down in vts status

We have 2 physical server which are basically identical (for load balancing and failover) One physical server consist of a bunch of docker containers including 1 x NginX 2 x WebSphere 8.5.5.8 ...
0
votes
1answer
34 views

Single front NGINX to proxy pass SSL to sites with their own certificates

Current setup: Front NGINX proxy passes 80 and 443 to local VM Local VM's NGINX redirects everything to HTTPS (if request is HTTP/80) Local VM's NGINX listens to 443 and proxy passes to the upstream ...
0
votes
1answer
63 views

How to config nginx as sticky loadbalancer for both http and https

I have the config below. However, when user switch from http to https, the session doesn't stick no more. Eg. homepage http but payment page is https. How do I solve this? upstream backend { ...
3
votes
2answers
73 views

Nginx subdomain SSL certs

I have a site that needs to answer on any number of arbitrary subdomains, e.g. client1.example.com, client2.example.com, etc. Everything is behind SSL. I'd really like to use Let's Encrypt which, of ...
0
votes
1answer
47 views

Why does docker pull from private Docker registry using nginx SSL reverse proxy work on registry host, but not remote host?

Why does docker pull from a private Docker registry using an nginx SSL reverse proxy work on registry host, but not remote host? Successful docker pull From registry host: admin@vps58622:~/docker-...
0
votes
2answers
73 views

nginx check if filename with different extension exists

If a file with ".html" extension doesn't exist I need to know if the same file exists with ".th.html" extension and make a redirect. Right now on 404 I'm doing a rewrite and if $request_filename ...
0
votes
0answers
59 views

Fail2ban 0.9.3 not working on centos7.2

I'm really struggling with this. The default [sshd] jail works fine. Status for the jail: sshd |- Filter | |- Currently failed: 0 | |- Total failed: 0 | `- File list: /var/log/secure `- Actions ...
0
votes
2answers
39 views

How do i configure nginx to use part of a URL as a header?

I am trying to get a server application running which supports multiple customers. They should each access the app with their own URL, e.g. http://localhost:8082/customer1/config, but the application ...
0
votes
0answers
26 views

set log level for 404'ed requests in nginx

I am analyzing my server log via journalctl: journalctl --since '24 hours ago' -p err and there are a lot of error messages from nginx for the simple reason that someone requested an invalid/not-...
0
votes
0answers
60 views

Site unreachable due to attack - xmlrpc.php

Today our server was not reachable. It was returning a 502. We are running Nginx 1.10 on Ubuntu 14.04. We also use PHP7 (only, no PHP5). In the logs, we got the same error from the same client (2 ...
1
vote
1answer
38 views

Websocket reverse proxy with nginx: Error about request in server log, but works in browser

The situation I am running Etherpad, which is proxied via nginx. Etherpad uses Websockets with Socket.io. My nginx config is more or less this one. The location block for socket.io is this: rewrite ...
1
vote
1answer
61 views

Nginx reverse proxy in docker container - wrong IP logged

I am running Nginx in a Docker container as a reverse proxy using the configuration below. It basically redirects the request to another docker container running on the same machine Problem The ...
0
votes
2answers
69 views

Nginx - subdomains to Apache, index to WP

I am trying to deploy our new Wordpress (with Apache2 in Docker) one-pager over our existing setup. Right below the LB we have an Nginx server that terminates SSL and proxies plain HTTP requests to ...
0
votes
1answer
70 views

Pass host from nginx to rsyslog

I have a cluster of nginx web servers and a separate syslog server running rsyslog. The nginx vhost looks like this: access_log syslog:server=10.0.0.51,facility=local1,severity=info combined; ...
1
vote
1answer
47 views

how set separate log file, to log 400 bad request errors in nginx

I have a nginx to host a django application. I need to log 400 Bad Request errors from my web page to a separate log file in nginx configuration. The docs I found was to give separate response in ...
1
vote
1answer
99 views

Configuring nginx reverse proxy to send TCP keep alive packets to server

We have IIS servers in Azure behind load balancer. Load balancer has unconfigurable timeout of 4 minutes after which inactive connection is killed. We're trying to setup nginx as a reverse proxy to ...
0
votes
0answers
9 views

High cpu usage by 'root' in Ubuntu VPS server [duplicate]

My server was working fine until last week. But I don't know how someone have changed by ssh root password. After that when I checked the CPU usage, it always 160-190% on executing 'top' command. Some ...
0
votes
0answers
15 views

How To Log TLS Mutual Authentication Details?

Is there a way to log the low-level details of the TLS mutual authentication flow (most importantly - the challenge that is sent to the client and the signed response). Solution for any tool is ...
-2
votes
2answers
24 views

Nginx config not redirecting

I have my nginx config and I am trying to redirect from a non www. version of the site to the www. version. server { listen 80; server_name *.example.com example.com; rewrite ^ https://www....
0
votes
1answer
18 views

Nginx Redirecting from file list

I would like nginx to perform redirects (302) on certain urls while changing part of the url to another based on a file (lets say a csv). For example: https://localhost/foo/100/bar.html to redirect ...
0
votes
0answers
48 views

Haproxy Nginx : How not to forward the local port?

I have haproxy which listening on ports 80 and 443 and behind Nginx listening locally on ports 8000, 8001, 8002 etc... By default, all works fine but when an application web made a redirect 301, it ...
0
votes
0answers
45 views

Can NGINX inspect the TLS request to look for SNI like HAProxy (etc) does?

It seems that, when configuring HAProxy for hostname routing on HTTPS connections, it is crucial to include a tcp-request inspect-delay directive to "give HAProxy a chance to look into the connection"....
1
vote
1answer
45 views

Nginx & PHP in a subdirectory

I have an app behind nginx. But i need a specific path in this app redirect to a Wordpress Blog Example : example.com/ -------> Redirect to my app example.com/whatever/ -------> Redirect to ...
0
votes
1answer
114 views

nginx: FastCGI sent in stderr: “Primary script unknown”

Using the latest version of nginx (1.10.0) and php-fpm (PHP 7.0.6) on 64-bit arch linux. When attempting to request index.php for a DokuWiki installation, I get the following error: 2016/05/21 22:...
1
vote
1answer
20 views

NGINX password protection for everything, but a single endpoint

I have two EC2 instances on AWS. I'm using NGINX 1.6 for both. The two instances are connected to an AWS load balancer. In order for the instances to be considered "up and running" the load balanced ...
0
votes
1answer
13 views

Django uwsgi deploy. Unable to find 'application'

Has a problem when starting uwsgi: unable to find "application" callable in file dashboard/wsgi.py unable to load app 0 (mountpoint='') (callable not found or import error) uwsgi.ini: [uwsgi] ...
0
votes
1answer
30 views

ssl curl not working

I set up my site I have ssl setup and working, works fine in chrome, works fine for postman. For whatever reason it does not work when twilio or curl trys to access it. It gives me a unable to get ...
2
votes
1answer
82 views

Does NGINX support SNI or does it not?

EDIT New question: Can NGINX inspect the TLS request to look for SNI like HAProxy (etc) does? According to what I've read around (and I've been told), NGINX should not support SNI and I should go for ...
0
votes
0answers
26 views

Nginx subdomain redirection

I have a site that is subdomain intensive. Each client has their own subdomain and "unknown" subdomains display a landing page asking the user to associate themselves with a client. Basically, ...
0
votes
0answers
34 views

Can we not enable ngix to act as reverse proxy and webserver, based on url?

This is my config file server { listen 80; server_name localhost; root /var/www/example/public/; location / { try_files $uri $uri/ $uri.html =404; } location /api { ...
-1
votes
1answer
42 views

Write shell script that listens to a port and executes an action

Could anyone give me directions as for how to write a shell script that constantly listens to a port and when someone/something sends an HTTP request to that port, it executes an action as sudo? I ...
0
votes
1answer
51 views

what is causing wordpress file empty error on uploads?

I can't seem to figure out why I get the following when I try to upload anything in wordpress... for both media uploads and wordpress import xml: "Sorry, there has been an error. File is empty. ...
0
votes
1answer
64 views

Running a python script on Nginx

This question might sound a bit odd to the people hanging out here, but i am just trying to start learning server side programming Is it possible to run a python script directly in a Nginx server ...
-1
votes
2answers
27 views

php to limit included file to access below and upon directory tree

I am trying to find solution for this problem for days. I have structure like this. index.php /app /plugins/ /users/%site%/functions.php /other stuff all requests goes to ...
0
votes
0answers
78 views

Rundom Facebook og: tags not found - operation timeout

I have a vps (Centos 7.2 64bit/CPanel/5GB Dedi Ram & 2GB Boost/CPU i7 2900-3.4ghz(4 Cores)/200GB Disk) with apache 2.4 and nginx 1.10.0, and I have set up wp multisite(subdomains) 4.5.2 with WP ...
0
votes
1answer
34 views

Nginx - can't open php files from a different directory -ERR: failed (13: Permission denied)

I have set a nginx, php-fpm, mysql and phpMyAdmin on my laptop (running Arch Linux). Everything was ok till I tried to move the root in my home directory. Here is the nginx configuration file I'm ...
0
votes
0answers
14 views

How to protect private key on windows server

How can I secure the private key I use for my nginx instance on a Windows server? I assigned the privileges to the same local user as the nginx is running. The assigned permissions are read and ...
0
votes
2answers
35 views

Disable Cloudlfare SSL on nginx to use certificate

I use Nginx to host a wordpress site which is configured to use exclusively SSL. A while ago, I activated the Strict SSL option and the HSTS option from Cloudflare. Now I want to disable it and only ...
1
vote
1answer
48 views

Permission Denied for fastcgi_pass using PHP7

I'm running LEMP with PHP7.0. I've got this in my server block fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; But when I open the site, it returns a 502 Bad Gateway. Below is the error log. *1 ...
0
votes
1answer
35 views

NGINX accessing the files in the wrong path

I have a codeigniter application that has the following directory structure <HOME> |_ <web> | |_<API> | |_index.php |_<admin> The developers have an index....
1
vote
0answers
29 views

Install Mod_Security for Nginx without need to recompile

I've got LEMP all setup. Now I would like to add mod_security. I tried to research but all I could find are instructions on how to recompile nginx. Is there a way to add mod_security without needing ...
0
votes
0answers
30 views

NGINX PROXY 0000 1204 0000 0000 0000 0300 0000 8000

After last update of nginx all my pages are getting: 0000 1204 0000 0000 0000 0300 0000 8000 0400 0000 0000 0500 ffff ff00 0004 0800 0000 0000 7fff 0000 0000 0807 0000 0000 0000 0000 ...
0
votes
1answer
49 views

Nginx default_server not working

I'm running nginx 1.2.1 with a couple of services. They all use their on domain and listen on 443 only. I want to lock out people who IP scan my server and don't know the domain. If there is no ...
0
votes
1answer
14 views

How to log request forwarded to fpm at Nginx

How to configure Nginx to log requests send to php-fpm into log? Goal is to have e.g. script path information ofter Nginx location etc. have been applied to.