Tagged Questions

nginx (pronounced "engine-x") is a lightweight, high-performance Web server and reverse proxy as well as IMAP/POP3 proxy server.

learn more… | top users | synonyms

1
vote
1answer
558 views

php-fpm or nginx capping out?

I'm using blitz.io to basically blast my site with traffic to see how my 'learning sysadmin' holds up under load. I realize this is as effective or relevant to real-world as a sledgehammer, but I ...
1
vote
3answers
1k views

403 forbidden on nginx

I'm trying to create a localhost server with nginx. I'm getting a 403 Forbidden on my page. Here's my nginx error log: 2013/03/30 20:39:18 [error] 12161#0: *1 directory index of ...
0
votes
1answer
127 views

Nginx: Cache uWSGI as accessible files

I'm still pretty new to Nginx, but I know that it serves static files very well. For this reason I want to use Nginx together with TileStache as a map server. TileStache has got a WSGI application ...
1
vote
2answers
2k views

Setting up a reverse proxy to cache images

I wrote a quick Python server to serve resampled images. For example, a URL might look something like http://images.domain.com/resample/100x100/9f362e1994264321.jpg. Being that resampling images is ...
2
votes
1answer
952 views

SSL Termination with HAProxy and Nginx on Ubuntu

I've been following this tutorial: http://www.exratione.com/2012/12/websockets-over-ssl-haproxy-nodejs-nginx/ ...but I've been having problems connecting to Nginx through HAProxy via SSL. I'm ...
2
votes
2answers
342 views

Nginx Windows Proxy Cache server static content

Basically i am trying to setup nginx with apache but i want nginx to serve static content such as javascript, stylesheets, media files etc but i want php to be passed to apache listening on port 8080. ...
1
vote
1answer
3k views

My pages are not getting served from cache.But nginx is actually caching the files

i have set up an nginx server in ubuntu as a reverse proxy cache server.My application code resides in /var/www/myapp folder. following are the configuration i have given in server { listen ...
1
vote
1answer
445 views

Debugging Gunicorn + Nginx + Django

I'm trying to deploy a readthedocs instance on my own server. The recommended way to deploy is using Gunicorn + nginx with postgres. Because there's basically no documentation on how to do this ...
0
votes
1answer
400 views

Nginx reverse proxy, satisfy any causing all clients to be permitted [duplicate]

I am having a problem with satisfy any in a server or location block causing all clients to be permitted access, which afaik is not the expected behavior. server { listen 80; server_name ...
0
votes
1answer
747 views

how to delete single nginx cache file?

when access http://mydomain.com/ its blank but working good with http://mydomain.com/index.php i need to delete nginx cache file for http://mydomain.com/ how to do it? Here my nginx cache conf. ...
0
votes
2answers
231 views

How can I set memory limit and execution timeout for a specific IP address using php-fpm and nginx?

I need to set a different timeout and execution time for a third party server that needs to import the products and prices on my database. Right now, they are telling me the php script is timing out. ...
0
votes
1answer
120 views

serving webapps out of arbitrary subfolders with nginx

I'm serving webapps out of arbitrary subfolders on a domain. i.e. example.com/app-one (with example.com/app-one/page served by app-one) example.com/folder/app-two (with ...
1
vote
2answers
343 views

making all subdomains use same document root with nginx

I have in the *.conf file for my domain the following: server { listen 80; server_name domain.tld; access_log /var/log/nginx/domain.tld.accesslog; root /var/www/domain.tld; index ...
2
votes
1answer
119 views

Nginx and HttpGzipStaticModule

I have an nginx instance built with the gzip_static module nginx version: nginx/1.2.6 built by gcc 3.4.6 20060404 (Red Hat 3.4.6-11) TLS SNI support disabled configure arguments: --prefix=/home/nginx ...
0
votes
1answer
370 views

504 bad gateway with Nginx

I have a J2EE application hosted on a linux VPS server. I use nginx as the web server and tomcat6 as the application server. At times, the website keeps waiting to load or sometimes even throws a 504 ...
0
votes
3answers
716 views

Port number being added to WordPress admin after Varnish install

I added Varnish in front of nginx. When I try to login to WordPress, I go to domain.com/wp-admin but I'm now redirected to domain.com:8080/wp-admin. I can manually remove the port and the admin side ...
0
votes
1answer
232 views

NGINX config help, Multiple Servers

I am having an issue with NGINX , this could quite possibly be an easy fix then again could not be I just don't know that much about NGINX. I have my NGINX config below which works great. But I have ...
0
votes
1answer
109 views

Prevent Nginx to serve php files unless php-fpm is also working

Recently I discovered my server is outputting php code out. The cause is that nginx is working but the php-fpm is not. As you can imagine this can be a serious security threat. So is there a way to ...
-1
votes
3answers
719 views

How do I make all subdomains to redirect to the domain directly in nginx? [duplicate]

I want to redirect url's like: http://subdomain.domain.com/r/wtf to http://domain.com/r/wtf How do I do this?
0
votes
0answers
565 views

Nginx open_file_cache

I've noticed an interesting issue with open_file_cache. Basically, I have a perl script that updates a page. I've noticed that with open_file_cache on this page will remain the same for the duration ...
0
votes
1answer
112 views

Incoming $_GET array is empty on my nginx

i have nginx configured like this: server { listen 80; listen [::]:80 default ipv6only=on; root /www/repos/havi/$subdomain; index index.php; server_name domain.com ...
0
votes
1answer
382 views

nginx, php-fpm on diff server bad gateway (and security too)

This is somewhat of a multipart question. First and foremost, I have 502 bad gateway, but I'm sure that's just because one of these lines I have below is wrong. Second, I would love to know how I ...
1
vote
2answers
172 views

How to serve same content to https and http with nginx?

Typically my nginx config looks like this: server { listen 80; server_name example.com; <some long config> } server { listen 443; server_name example.com; ...
0
votes
3answers
211 views

Force WWW with Varnish and nginx

I'm trying to figure out how to force WWW in varnish for only one domain. I saw this answer to remove WWW but I don't know how to translate it to force it. Edit: To clarify, my nginx config was ...
0
votes
1answer
400 views

how to apply nginx rewrite from htaccess

I installed ispconfig/nginx on ubuntu 12.10 following "perfect server" here: http://www.howtoforge.com/forums/showthread.php?t=61141 I need to apply rewrite rules to nginx from a .haccess file with ...
1
vote
1answer
360 views

using nginx try_files and autoindex together

I have the following server configuration: server { listen 80; server_name _; root /var/www/; location /calendars/ { autoindex on; try_files $uri.ics $uri =404; ...
0
votes
2answers
2k views

nginx auth_basic errors: user not found and no user/password provided

I have set auth basic in nginx and blocked other ips like: location / { auth_basic "Restricted Area"; auth_basic_user_file .htpasswd; allow 127.0.0.1; deny all; } I can login using the ...
2
votes
1answer
824 views

Logging the response body with Nginx Lua

I have a reverse proxy that l want to log request body with which currently looks lie log_format my_tracking '"$request" "$http_soapaction" "$http_content_type" "$request_body"'; which is logging ...
0
votes
1answer
521 views

Protect webmin access with username/password [closed]

I just installed webmin in my FreeBSD box, now it can be accessed as http://my-ip.com:10000, When I enter that address in browser I can see the login page of webmin directly. I want to have some ...
1
vote
1answer
572 views

How to enable streaming when file is delivered through PHP script?

I'm trying to enable mp4 streaming on my content server. Due to some security fanatics whom I working with all files are delivered through a php script and have the following url format: ...
0
votes
1answer
483 views

How to set Varnish so that it doesn't cache a specific URL with a query string?

Server setup: Ubuntu 12.10, Varnish 3.0.2, Nginx 1.3.14, with a WordPress 3.5.1 install. We are using the "Random Redirect" plugin which shows a random blog post at the URL http://example.com/?random ...
0
votes
1answer
79 views

give access to just one page for blocked ips in nginx

I have a site in development, I want only my IP to access the website and block all other IPs. I could do that with allow 1.2.3.4 in Nginx and deny all. However I want other visitors to see just one ...
0
votes
1answer
259 views

How to serve html code from nginx and also ping upstream server for same request?

We are using nginx running on one host as a proxy to a java servlet running in tomcat on another host. What we want to do is say for a request http://a.xyz.com/a/b?q1=v1&q2=v2, we want to serve ...
1
vote
1answer
168 views

Encrypted tunnel from load balancer to upstream servers. SSH vs. SSL?

We're building a load balanced setup with two load balancers (that also terminate SSL) and several upstream servers. Both the load balancers and the upstream servers run nginx. The network on which ...
0
votes
1answer
144 views

redirect blocked ip to different url in nginx

In my Nginx config I have location / { allow 198.168.0.1; deny all; } Now, I want to redirect all other IPs except the allowed one to google.com, how do I do that ? I have tried something like ...
0
votes
1answer
322 views

Centos 6 - Nginx - [emerg] socket() 0.0.0.0:80 failed (105: No buffer space available)

I tried to restart nginx by doing: /etc/init.d/nginx restart However I receive this error message: nginx: [emerg] socket() 0.0.0.0:80 failed (105: No buffer space available) nginx: configuration ...
1
vote
2answers
550 views

Access Code 304: Accessing nginx in vmware from host

I have successfully installed gitlab which use nginx (Thanks to this thread: gitlab installation: using localhost). I can run the software in localhost (http:// localhost will get me to gitlab front ...
0
votes
1answer
95 views

Nginx Cache Control breaks working paths

I'm following the html5boilerplate nginx setup for the most part, but everything keeps breaking when I include expires.conf. HTML5BP for Nginx setup: ...
0
votes
2answers
370 views

Redirect only home page

I need to redirect only http://shop.test.com to http://www.test.com/fedex-orders/ Just homepage. Nothing else. ie http://shop.test.com/?page=blog should NOT redirect.
1
vote
1answer
4k views

gitlab installation: using localhost

I am following this instruction to install gitlab: https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md All is well until #7. nginx. I have problem with this specific ...
0
votes
1answer
540 views

Multiple sites with Varnish and nginx on the same server

UPDATE: I found a typo in my config. I forgot one of the ports to change over. The issue is resolved. Originally I had a server with nginx running multiple websites. I added Varnish in front to be on ...
0
votes
1answer
406 views

nginx + php-fpm “connect() failed” errors in logs, no visible impact

I'm trying to figure out why I have so many of these error logs: [error] 1545#0: *713626 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xx.xx.xx, server: ...
0
votes
2answers
414 views

Nginx location exact match matches beyond arguement

In my nginx config, I would like to catch /foo/ and do a rewrite using location, but for it to ignore /foo/anything-else I've tried: location = /foo-bar/ { and location ~ ^/foo-bar/$ { and ...
2
votes
3answers
454 views

Is this a sensible way to scale Nginx for static content serving?

I need to set up some VPSs for serving static content (many small files). I plan on using Nginx for this, and would like to set it up so that we are able to scale out relatively easily. The ...
1
vote
1answer
63 views

Nginx: maintenance mode with “is a developer” check

It's much variants described in Internet how to display maintenance page with nginx. But I didn't find the solution to check if user is a developer and not to display maintenance page for developers. ...
1
vote
2answers
179 views

Nginx error log is 96GB in size

Today my server was unresponsive to HTTP requests and it looks like the cause was that nginx went down because when I restarted nginx, it worked again. I wanted to take a look in the error log to see ...
0
votes
2answers
946 views

PHP-FPM Pool, Child Processes and Memory Consumption

In my PHP-FPM configuration I have 3 Pools, the eg: Config is: ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 1 ; ;;;;;;;;;;;;;;;;;;;;;;; [www1] user = www group = www listen = /tmp/php-fpm1.sock; ...
0
votes
1answer
74 views

PHP-FPM as a dedicated application server?

Just wondering in terms of scalability .. do you reckon PHP-FPM should run on a standalone server or works as well if you run it with NginX on the same server?
0
votes
2answers
149 views

Accidently set chown “root” to all my server

I'm running 2 magento apps on my web server and I accidently set "chown -R www-data:www-data *" from the root of the server. Meaning, all the files were owned by the user root. This immediately ...
0
votes
1answer
164 views

Investigating a phishing complaint

UPDATE: Seems it was a fake email, so not really that urgent, but the questions are still valid. So I received an email about a VPS I host (I'm a VPS hosting company, this is a customer VPS) being ...