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
1answer
1k views

Multiple server blocks in nginx: Php not working on server 2

I have a nginx server running on my webserver. I would like to achieve the following: example.com + www.example.com -> /my/web/dir/www pma.example.com -> /my/web/dir/pma The first point is not ...
0
votes
2answers
15 views

NGINX: using multiple node as load balancer

I have application deployed on tomcat server on machine A,B,C,D I want to load balance using the Nginx using two load balancer nodes LB1 & LB2. All documents talks about using single node as ...
-2
votes
0answers
18 views

Give www-data Permission To Reload Nginx Works Via Command Line but not cron [duplicate]

I have been researching for literally days, and to no avail. I have been trying to get my php script to be able to reload nginx. exec("sudo /etc/init.d/nginx reload"); works when I run the script ...
0
votes
1answer
32 views

nginx & httpd doing reverse proxy together

Working as a sys admin for multiple departments, and due to constrained resources, I'm considering deploying nginx and httpd in one server. (Due to developer requirements, using Docker isn't an ...
1
vote
1answer
26 views

Apache2 and nginx randomly consuming all memory, every week or so

I'd like to preface this by saying I have read at least 10 related Serverfault questions before resorting to making my own... I am currently running a Ubuntu 14.04.3 server with 2GB of RAM and about ...
1
vote
1answer
1k views

Nginx does not cache json

I have the following nginx configuration user nginx; worker_processes 10; pid /var/run/nginx.pid; events { worker_connections 1000; } http { sendfile on; tcp_nopush on; tcp_nodelay ...
0
votes
3answers
30 views

Nginx disable .htaccess and hidden files but allow .well-known directory

I have a Nginx server, and disabled hidden files in the nginx_vhost.conf ## Disable .htaccess and other hidden files location ~ /\. { deny all; access_log off; ...
0
votes
2answers
1k views

Enable Cross Origin Scripting on Nginx from retina.js to load files from another URL?

Im running a retina image plugin along with W3 Cache for CDN support. W3 cache moves images to S3, but the JS file won't server the files from there due to the difference in URL (it goes from h ...
3
votes
1answer
1k views

nginx & php-fpm [debug] 11: Resource temporarily unavailable

New Development The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is : memory_size 1024; so it's not php's memory limit. I've also ...
4
votes
1answer
995 views

How to enable certain SSL cipher while having disabled the group?

I would like to enable the SSL cipher EDH-DSS-DES-CBC3-SHA (also known as TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA) in my nginx SSL environment to support IE8 on Windows XP. The base SSL ciphers for nginx ...
0
votes
2answers
2k views

nginx unknown directive ssl_protocols

I've compiled NGINX 1.4.1 with ssl support and wanted to secure my configuation with these lines: ssl_prefer_server_ciphers on; ssl_protocols        SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers          ...
1
vote
1answer
13 views

AWS ELB health check failing when trying to force HTTPS through NGINX for my single page application

I'm trying to force https on my http endpoints using NGINX like so: server { location / { root /data/www; if ($http_x_forwarded_proto != 'https') { rewrite ^ ...
0
votes
0answers
9 views

error 524 timeout cloudfire in linux server?

My plan in a VPS digitalocean is: 4 GB RAM 60 GB SSD DISK (And nginx (webserver), php5-fpm, varnish and a store Magento, and Cloudfire for dns) So.... i have a magento store and when i try to make a ...
0
votes
1answer
26 views

Nginx proxy_pass not normalising URL

I have the following config for an angular frontend on / and a node.js backend on /api/: server { listen 80; server_name example.com; location / { root /home/ubuntu/www/admin; ...
0
votes
1answer
7 views

Changing the name of php5-fpm pool causes 502

I have a webserver running multiple sites, each site has it's own php5-fpm pool. One particular site is behaving very strangely. I have a conf file setup for it in /etc/php5/fpm/pool.d/ and ...
6
votes
2answers
12k views

Is it possible to make Nginx listen to different ports?

I created one Nginx with one Linux Azure VM, is it possible to make nginx listen to different ports so that when I change the port number, the content would be different. I found there would be a ...
1
vote
1answer
20 views

mod_rewrite issue Apache behind Nginx

I have nginx proxying to apache as a backend in order for nginx to handle static assets. Unfortunately when I attempt to visit a "pretty url" it just displays the index page. nginx config server { ...
0
votes
0answers
15 views

Server Specs for browser game that hugs cpu

Our team have developed a web browser game, our servers are using nginx and php-fpm to host the website. the game consist of two parts an api and the game itself. both applications reside on its own ...
6
votes
1answer
4k views

git on HTTP with gitolite and nginx

I am trying to setup a server where my git repo would be accessible with HTTP(S). I am using gitolite and nginx (and gitlab for web interface but I doubt it makes any difference). I have searched ...
0
votes
1answer
11 views

AWS ELB + NGINX for rails app

If I'm using Amazon's Elastic Load Balancer for a Rails app, do I need to put an Nginx reverse proxy between the app and the ELB?
1
vote
1answer
52 views
+50

What is a correct way(s) to allow login to an IIS site through a reverse proxy?

I have an nginx reverse proxy, and I'm trying to get an IIS website with login to work behind it. I've found this question asked several times, but each answer appears to be different, and some of ...
0
votes
2answers
15 views

nginx: proxy special file patterns (css) from s3

we are serving a web app with nginx. It proxys everything that comes in over https to a server listening on localhost. Now I want nginx to act as a proxy and serve our css files from s3. As I want ...
13
votes
4answers
17k views

How to stop nginx on Mac OS X

I've installed and configured nginx server on my Mac from MacPorts sudo port install nginx Followed the recommendation from the port installation console and created the launchd startup item for ...
1
vote
1answer
9 views

nginx: use try_files to serve file instead of directory

My server uses nginx, and my domain serves static html web pages, i.e. http://server.com/download.html For various reasons, I would like that users are able to fetch download.html through the ...
0
votes
1answer
24 views

how to set php_value session.cookie_domain in nginx config

I have below line in Apache config, php_value session.cookie_domain '.domain.com' I want to convert it into ngixn syntax. How to set php value session.cookie_domain in nginx config?
0
votes
2answers
36 views

prevent from ddos attacks with nginx and apache (and haproxy?)

Sometimes i have ddos attacks on my server. I'm trying to prevent from this. I'm using Nginx to serve static content and as a reverse proxy and Apache to serve php applications. When the attack ...
-2
votes
0answers
34 views

compute engine how to access external ip

I just got a trial compute engine and I've been trying to set it up. This is the first time I set up a web server from scratch. I'm trying to serve a web app written in node, and I want it to sit on ...
0
votes
1answer
994 views

Configure Monit to monitor PHP5-FPM on Ubuntu/Nginx setup

System: LEMP running on Ubuntu 14.04 I'm trying to configure the tool Monit to restart Nginx or PHP-FPM if ever there is a problem. It is correctly monitoring Nginx however under status for PHP-FPM ...
1
vote
2answers
4k views

Nginx upload PUT and POST

I am trying to make nginx accept POST and PUT methods to upload files. I have compiled nginx_upload_module-2.2.0. I can't find any how to. I simply want to use only nginx for this, no reverse proxy, ...
1
vote
3answers
36 views

Nginx: Access same content from multiple URLs

I'm trying to configure nginx so that the same static content can be accessed through two different URLs without any redirects. For instance, if the client enters /path/to/A in their browser, I want ...
0
votes
1answer
27 views

Ubuntu - Nginx + php5-fpm - suddenly times out every request even after restart

Caveat - Newbie nginx/php5-fpm/ubuntu I inherited a couple linux boxes and have had the same thing happen on both. I assume it's user error, but for the life of me I don't know what I did. ...
2
votes
1answer
60 views

Nginx setup, 443 open but no respons on https://

So i just integrated my certificate and my nginx conf verifies it when i restart. When i do a: netstat -anp | grep 443 it returns: tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN ...
48
votes
5answers
25k views

How can I use environment variables in Nginx.conf

[Cross-posted and edited down from http://stackoverflow.com/questions/21933955 as it was considered too sysadmin-like for StackOverflow.] I have a docker container running Nginx, that links to ...
0
votes
1answer
1k views

Codeigniter URL only work for default router

I've installed Codeigniter on Nginx with this configuration : server { listen 80; server_name myserver; root /usr/share/nginx/html; index index.php index.html index.htm; error_log ...
0
votes
1answer
27 views

Nginx M/Monit password protect

I am trying to protect access to M/Monit web interface: Box: ubuntu 14.04 nginx 1.8.1 mmonit-3.5.1 I created a mmonit config file under /etc/nginx/sites-available: server { listen 8080; ...
0
votes
2answers
59 views

Nginx: proxy_pass dynamic from location

I hope you can help me with a little but tricky nginx problem: I want to configure a dynamic location-block like this: location /test1/* { proxy_pass destination.com/api/*; ...
1
vote
1answer
28 views

nginx location redirect to folder with name as requested domain

I'm new to nginx and I want to do this: If the URL contains "/assets" redirect to "/communities/$url_domain" In other words: Requested: "http://www.cats.com/assets/superfile.png" ...
1
vote
1answer
1k views

403 Forbidden nginx (nginx/1.8.0)

I've just got a new server in DigitalOcean and want to try some other things. I want to start a wordpress site so I follow the first 1-3 steps from here: ...
0
votes
1answer
29 views

Nginx proxy configuration to hit the backend api via http proxy

I need the Nginx web server to connect to a https server listening on port 443. The https server cannot be reached by Nginx server machine directly and to reach the https server the nginx server needs ...
2
votes
1answer
3k views

nginx return 301 / redirect

among all 'redirect in nginx' questions I couldnt find how to redirect (using return 301 and beteer no ifs) using regexps. I have a link to my website and I'd like to remove parameter a the end: ...
-1
votes
0answers
26 views

PHP path not correct in phpMyAdmin (cgi.fix_pathinfo)

I have a problem with setuping phpmyadmin on nginx+php-fpm servers. With cgi.fix_pathinfo = 0 phpmyadmin setting script path incorrect. After i logging in as db user it redirect from ...
0
votes
1answer
23 views

Nginx failed space when upload

I've a problem with my nginx server. He is a storage server, and when i want to upload a file (2,5G) i can show any error on my error.log 2016/02/08 03:26:24 [crit] 7843#0: *1154 pwrite() ...
-1
votes
2answers
33 views

nginx 1.8.1 only works with default root

I have Cent OS 6.6 with nginx 1.8.1 installed. It seems like if I change the root in the conf file to something other than the default '/usr/share/nginx' it gives an error 403 Permission denied. I ...
1
vote
1answer
1k views

Loadbalancing with nginx and tomcat

Hello this should be fairly easy to answer for any system admin, the problem is that I'm not server admin but I have to complete this task, I'm very close but still not managing to do it. Here is what ...
7
votes
2answers
1k views

Deploying Django App with Nginx, Apache, mod_wsgi

I have a django app which can run locally using the standard development environment. I want to now move this to EC2 for production. The django documentation suggests running with apache and ...
2
votes
1answer
131 views

HTTP/2 returning weird symbols

So I switched my nginx server over to use HTTP/2, and it works for Edge and Chrome. On IE11 however I'm getting no response, only this: http://i.imgur.com/zGRI6th.png On firefox the page simply ...
0
votes
2answers
25 views

Why is nginx running with a new PID each time I list my processes

Why is nginx restarting with a new PID each time I list processes? And also, why is nginx running to begin with? Refer to image below for output. Nginx Output I don't know if this is useful but I ...
-1
votes
0answers
18 views

When does nginx's proxy_pass return 301 and when does it forward the request?

When using a nginx server on a vagrant (hosted by virtualbox) i used this config ... server { port_in_redirect on; listen 80 default_server; listen [::]:80 default_server ipv6only=on; root ...
1
vote
0answers
25 views

Nginx per used directory sites configuration

I have virtual server with 25 hosts with WordPress sites. Users need to be able to access their sites via ~username from main domain like this : http://subdomain.example.com/~username/ which works ...
0
votes
1answer
30 views

Nginx configuration mix

Is it possible to mix some configuration settings in Nginx? For example there is the auth_basic, which should work everywhere. And there is some other configuration spefic for one directory. Or there ...