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

6
votes
3answers
5k views

nginx stop/reload on windows failed for Access is denied

I am running nginx on Windows Server 2008 R2 (x64) as a windows service. I am using Windows Service Wrapper for that. (Actually, I have followed this tutorial: ...
3
votes
3answers
5k views

How to redirect root to subdirectory while maintaining URL in the address bar

I have an nginx setup with folder structure like this: - www |- splash |- blog www is the root folder. I would like to redirect users who access http://example.com to the splash folder. But I ...
2
votes
3answers
739 views

How can I fix Sinatra redirects switching from https to http under nginx?

I have a Sinatra app running in nginx (using thin as a back-proxy) and I'm using redirect '/<path>' statements in Sinatra. However, when I access the site under https, those redirects send me to ...
1
vote
3answers
87 views

To SSL or to not SSL

Currently I have a website that serves a lot of mixed content I have the whole website under ssl. example.com All static content such as css js and a small amount of my own images such as logos ect ...
1
vote
3answers
1k views

Varnish 4 Working Config (optimized) for Wordpress (default.vcl)

I have successfully set up varnish 4 on my nginx 1.6.2 it is working but as per the test on http://www.isvarnishworking.com/ it shows Varnish appears to be responding at that url, but the ...
1
vote
3answers
1k views

Nginx custom 404 page results in 500 internal server error

Here is my nginx config: server { # Running port listen 80; error_page 404 /404; # Settings to by-pass for static files location ^~ / { # Example: # root ...
1
vote
3answers
360 views

nginx - linux permissions interesting issue

I'd like to get some answers or suggestions to my problem. So I'm getting a simple error: 2014/02/16 12:01:43 [error] 7384#0: *1 FastCGI sent in stderr: "Primary script unknown" while reading ...
1
vote
3answers
799 views

On Ubuntu installed NginX and Can't find where new WWW root is

On Ubuntu 13.04 the original WWW was in /var/www/ then I installed NginX and it installed correctly but I can't find the actual folder accessible by http (I looked in /etc/nginx/). I searched for ...
1
vote
3answers
3k views

Varnish 3.0.2 to Apache2 sometimes return error 503

Hey guys I hope you can help me out here. I have an Ngingx parsing http and https to a varnish cache(3.0.2). From the varnish it is sent to apache2. Now I have for some time been tracking some ...
1
vote
3answers
1k views

nginx rewrite rules: Rewrite /test/ and /test to /test.php

How do I do this? This seems to work by default in apache, but not on nginx it appears?
0
votes
3answers
73 views

restart php5-fpm from php script

Ok, this is a tricky one (I think) I need to reload php5-fpm from a php script The obvious issue is that once the reload command is executed, the current script is disturbed, I tried to delay the ...
0
votes
3answers
116 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/*; ...
0
votes
3answers
236 views

NGINX Reverse proxy not loading resources

I'm trying to put a reverse proxy in front of a few internal web services. Nginx is setup and working properly to serve request. If I only serve one location / in my conf file, it loads that ...
0
votes
3answers
34 views

Hide a path node in nginx

I have the following url: http://example.com/dr/2015/10/pic.jpg where 2015/10/pic.jpgis dynamic: 2015 is the year, 10 is the month number and pic.jpg a file name. Every time an image is sent, the ...
0
votes
3answers
604 views

Why my browser wouldn't load all image resources at once?

I am trying to optimize the loading time of a webpage. Currently, the main http request can be done in under a second, however, the consenquent loading of images seems "to cascade": ...
0
votes
3answers
224 views

NGINX Not showing my index.html - Stays default

server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /var/www/apexnetwork.org/public_html/; index index.html index.htm; # Make site accessible from ...
0
votes
3answers
490 views

aws ec2 security group and centos ip tables

I try to change the SSH port from 22 to another port (218). In AWS EC2, I shall add the rules in security group or in IP Tables? Is there any guideline/references recommended for EC2 Security ...
0
votes
3answers
2k views

Jenkins has no list of available plugins / can't update

I just installed Jenkins 1.575 on Ubuntu 12.04LTS. When I go to the plugins section to add plugins, nothing shows up. If I go to Advanced and click check now, it just hangs at Updating.... I am ...
0
votes
3answers
1k views

Make files without an extension go through the PHP parser on nginx

Due to legacy reasons I need to get the following scenario working on nginx and I seem to be struggling. Say I have a file in the document root just called 'info' without any file extension. Now this ...
0
votes
3answers
399 views

Nginx FastCGI on subdirectories

I'm trying to make Nginx proxy multiple web applications (among others, Tiny Tiny RSS and phpPgAdmin) onto different subdirectories under the same domain. For example, TT RSS is under ...
0
votes
3answers
2k views

Nginx proxy pass and url rewriting

How to trig this rule only when I have parameters in url, otherwise I will match on an alias. location ~^/static/photos/.* { rewrite ^/static/photos/(.*)$ /DynamicPhotoQualitySwitch/photos/$1 ...
0
votes
3answers
4k views

corosync + pacemaker + nginx

I have been trying to configure and implement corosync + pacemaker + nginx to my vbox to create a High-Availability set-up between web servers. But can't find an exact tutorial on how to make it work ...
0
votes
2answers
275 views

Installing guide of nginx 1.2 and php 5.4 on Centos?

I have been searching this for a while, but fail to find an up-to-date guide of installing the newest version of nginx and php on a centos system. Any help is appreciated. Thanks!
0
votes
2answers
431 views

Adding CNAME entry to nginx for cdn rewrite

I am using apache + nginx (for serving static content) and just bought a CDN. I have added a CNAME entry to my CDN URL, which should be cdn.example.com and pointing to the original cdn url. ...
0
votes
2answers
512 views

Nginx + Passenger = Slow response

I'm running nginx 1.0.4 with Passenger 3.0.11 and Rails applications and I've noticed that on every request I made, it takes about 5 seconds to respond for the first request, if I reload it, after the ...
0
votes
2answers
1k views

User http does not have write permissions directory?

I have a bit of an odd set up, I think. I have groups for each domain my server hosts, and I add the user http to each domain group along with the users that should have access to the groups' domains. ...
0
votes
2answers
2k views

Chef-solo cannot locate an nginx recipe template

I have been recently experimenting with Chef. I thought I would attempt to rebuild my personal web server using chef-solo. It's an AWS instance running the Amazon 64bit Linux AMI. My first ...
0
votes
2answers
281 views

nginx + MySQL + php5 + Wordpress: Too much php5-fpm processes

I have this web server running on nginx + MySQL + php5 + Wordpress. The thing is, the server is to slow and I think it's due to the number of php5-fpm running. Look at the numbers of php5-fpm ...
0
votes
2answers
552 views

Configuring NGINX for W3 Total Cache

I installed the W3 Total Cache plugin which automatically configured my nginx configuration file. Unfortunately, no CSS or other static files are showing up for me. Everything 404s except for the ...
0
votes
2answers
376 views

Using an upstream proxy only for certain URLs

I'm configuring a transparent proxy for my home, and I want certain URLs to go through an upstream proxy. I'm currently using Squid, but I'm open to other suggestions. I've looked at Squid's ...
0
votes
2answers
689 views

nginx redirect proxy

I have a web app running on a nginx server on local ip 192.168.0.30:80 I have this in my etc/hosts 127.0.0.1 w.myapp.in If someone accesses my app using a "w" subdomain, it shows a webdav ...
0
votes
2answers
419 views

What ports, besides 80, need to be available to send (only send) email using phpmailer to gmail over SSL?

Using phpmailer I keep getting a 110 timeout and "Unable to connect to host" when sending email from my web server. The authentication details are right and they work on another server I have (login, ...
0
votes
2answers
438 views

nginx + wordpress in /wordpress subdir

I installed nginx and would like to setup wordpress as a final step. I followed many howtos but am unable to get it working. The setup is fairly straightforward, the root dir of the webserver is ...
0
votes
2answers
238 views

Disconnect from PHP after output generated

I have a LEMP stack. Nginx sitting in front of PHP-FPM. Because some of the sites are heavy and there's OPCode caching, PHP is set up so that there are only 5 child processes running. The aim being ...
0
votes
2answers
489 views

How do I handle a request for “index.php/somepath” in Nginx config?

I'm currently attempting to serve Icinga from nginx. The new Icinga-Web ui attempts to load a file from URL http://SERVER/icinga-web/index.php/appkit/squishloader/javascript (leading to a 404). How do ...
0
votes
2answers
263 views

How to make nginx redirect

How I can redirect all SSL requests to "https" folder? My frontend webserver is nginx. For example: https: //website.com/checkout.php should be redirected to https://website.com/https/checkout.php ...
0
votes
2answers
361 views

nginx rewrite mystery - duplicating hostname and losing https

I am replacing lighttpd with nginx on my development server. I got it working with PHP and SSL, but I'm stumped by what should be a simple rewrite. I need to rewrite URLs from ...
0
votes
2answers
542 views

fcgi only using one processor?

I'm working on a setup which uses fcgi/nginx. It seems to be running correct (24 children and 500 max requests), except that all of the phpfcgi instances are piling on one core. When I run top, I ...
0
votes
2answers
370 views

nginx giving of 404 when using set in an if-block

I've just started using nginx and I'm now trying to make it play nice with the Wordpress plugin WP-SuperCache which adds static files of my blog posts. To serve the static file I need to make sure ...
-1
votes
2answers
24 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 ...
-1
votes
2answers
257 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
votes
2answers
115 views

Making php use specific network interface / IP

TL;DR: Is there a runtime or php.ini directive for IP/network interface? Setup: Debian, NginX, php-fpm The machine has multiple IPs configured in the network interfaces. Each virtual host in NginX ...
-1
votes
2answers
73 views

How to alias directories in nginx?

I for the life of me cannot figure out how to make aliases for locations. Basically, I have /var/www on my server, which could contain any number of folders (for different applications). One of those ...
-1
votes
2answers
834 views

Redirecting/rewriting wildcard domains to ssl in nginx

I have tried all the solutions found on this site and others but am still having a problem with redirecting a wildcard subdomain with http to https. I still end up with ...
-1
votes
2answers
392 views

Configuring nginx to check for hard files in only a few directories,

For a node.js project I'm doing, I have a tree like this. ├── public │   ├── components │   ├── css │   └── img ├── routes └── views Essentially, I have the root to be set to public. I want all ...
-1
votes
2answers
1k views

Nginx 404's all static content in reverse proxy setup

Whats strange is that this exact configuration used to work fine, but now all static files will 404 on direct link i.e domain.com/test.html domain.com/test/test.html domain.com/ and ...
-1
votes
2answers
1k views

How to restart RoR services after server has been rebooted

Update I have been searching around to see what services would possibly need to be restarted in my project after reboot. One of them was thinking sphinx, which I finally got to the point where it ...
-1
votes
2answers
4k views

nginx 301 redirect to subfolder on primary domain

I just set up Wordpress on my VPS, so far it's the only item on my site. For SEO purposes, I think it's better to redirect the primary domain to the blog folder. So let's say the primary domain is ...
-1
votes
2answers
1k views

Adding expire headers to content served from CDN?

I'm using MaxCDN to serve content to my blog using W3 Total Cache. The problem I'm running into when evaluating my site using Google Page Speed and YSlow! is that expire headers are not being sent on ...
-2
votes
2answers
21 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 ^ ...