nginx

How do you set up SSL and Nginx Proxying?

I have Nginx listening to traffic on port 80 and proxying certain request to Apache over port 8080. I am going to set up Nginx to listen to port 443 for https traffic, but my question is how should the proxying be done now? Does the proxy to Apache need to be https or has Nginx already decoded it so I can keep sending it to Apache over p...

apache vs nginx vs lighttpd? Which is simpler to configure and administer?

A bit more context, in case this question is too general: the uses I have in mind are running django and serving static content and name-based virtual hosting. I am vaguely aware of the performance/resource tradeoffs between the different servers, but that is a secondary concern. Anyone who has deployed all three in production? ...

nginx as mail proxy

I am trying to setup nginx as mail proxy. All i want is to let nginx receive the mail and forward it to a script. Is this set possible or should i only use sendmail for that. ...

Can I get Nginx to log certain types of requests differently?

I want Nginx to log requests that start with /path to a certain log file. like this: http://domain.com/path/to/dir = Logged http://www.domain.com/to/some/dir/path/ = Not Logged http://sub.domain.com/ = Not Logged Sorry if this is vague, but I'm new to the nginx config biz. Feel free to ask questions about what I'm doing, I'll answer...

Differentiate nginx behaviour depending on URL

I have a Django application and I use nginx to serve static content. Unfortunately, all registered MIME types get displayed in client browser, while I would like to give an ability to download the same content, along with usual behaviour. Say, I have JPEG file under /media/images/image01.jpg and I want that nginx serves this file in usua...

Which to use on low spec CPU?

Hello, I have a dedicated server where i'm only the user in it. Processor : AMD Sempron 3100+ Memory : 1GB DDR I I'm using PHP for website. Its mostly used for downloading stuff and uploading and so. I currently using apache, it eats too much processor. So i came across few better then apache. I need to know which one of this good ...

Thin + Nginx Production ready combination for RubyOnRails Application.

I have recently installed Nginx + Thin on my deployment server, but i am not sure how this will perform in last requests & responses situation. lets say 1000/req per sec. so the speed on thin is good with 10-100 req /per sec I wanted to know on higher volumes of data being processed on the request/response cluster. Guide me on this :-...

Is using a Web Server like Lighttpd and nginx in most cases just Premature Optimization?

I'm currently using Lighttpd on a VPS. Before that it was nginx, but I came back to Lighttpd because I needed CGI. Apache's HTTPD is mainstream. All documentations include examples for Apache and most modules are only available for Apache. Is the effort to use something different from Apache really worth it? ...

How do I prevent a Gateway Timeout with Nginx

I am running Django, FastCGI, and Nginx. I am creating an api of sorts that where someone can send some data via XML which I will process and then return some status codes for each node that was sent over. The problem is that Nginx will throw a 504 Gateway Time-out if I take too long to process the XML -- I think longer than 60 seconds...

Sharing PHP-CGI between Apache and NGINX

Hi, I've been running most of my PHP apps on my website on a fastcgi backend, served by NGINX. I have a new application which seems pretty well integrated with Apache; it's heavily dependent on dynamically written .htaccess files, for example. I'm working on modifying it to work natively with NGINX, but that's not yet ready. In the mean...

Using nginx rewrite to hide or clean URLs?

Greetings. I've been trying to grok regexes and rewrites but i'm a newbie at it. I have a simple site, one dir only, all i want is to rewrite domain.com/file.php?var=value to domain.com, making sure the user will only see domain.com in the adress bar throughout site navigation (even if i start making the site more complex). Simply spea...

how to nginx virtual servers + fcgi for django?

I would like to run several virtual hosts via nginx, each serving a different django app via fcgi. Is this possible? If so, does anyone have good resources on where/how to start? The nginx docs seem to be mostly examples, but none of the particular config I'm attempting... ...

Add slash to the end of every url (need rewrite rule for nginx)

I try to get an "/" to every urls end: example.com/art should example.com/art/ I use nginx as webserver. I need the rewrite rule for this.. For better understanding check this: http://3much.schnickschnack.info/art/projekte If u press on a small thumbnail under the big picture it reloads and shows this url: http://3much.schnicks...

Best method of post processing Nginx reverse proxy response

I'm doing some researching on switching from Apache to Nginx as a reverse proxy in front of a Grails application on the backend. I'm playing around with some URL rewriting and have run into an issue with the response being sent back from my back end. I can handle the location header rewrite but I'm wondering what the best way to process ...

Apache/nginx fine grained (per file) permissions?

Is it possible to set fine-grained permissions using either Apache or nginx? Given a large number of files and a large number of users, what's a good way to specify that each authenticated user only has access his/her own files? user_a can access file_a_1, file_a_2 user_b can access file_b_1 user_c can access file_c_1, file_c2, file_c3,...

Strange http gzip issue

Here's a strange one: I've got nginx reverse proxying requests to apache 2 with mod_php. A user (using firefox 3.1b3) reported that recently, he's started getting sporadic "What should firefox do with this file?" popups during normal navigation. We haven't had any other reports of this issue, and haven't been able to reproduce it ours...

nginx + FastCGI for django application---run two webservers or one?

I'm about to deploy a Django application on a nginx web server, and want to make sure I'm building the system correctly. It seems to be common wisdom that if you are deploying Django on an apache server, then you should still put an nginx server in front of the application to serve static files, at which nginx is more performant. If in...

How do I run more than one Django site on a single server using fastcgi?

I'm running Django on a server with a dozen or so virtual hosts set up. The first Django site I've put together works great, but I'm about to set up a second. Do I need to run a second fastcgi process? For the first site I'm running fcgi this way: /home/django/app1/manage.py runfcgi protocol=fcgi host=127.0.0.1 port=8081 The nginx ...

Can HAProxy front both Web servers and SSL VPN on one IP and port?

I need a Reverse Proxy to front both Lablz Web server and SSL VPN Adito (SSL Explorer fork) by sitting on one IP/port. Failed to achieve that with Nginx. Failed to use Adito as a generic reverse HTTP proxy. Can HAProxy fall back to being a TCP proxy if it does not sense HTTP traffic? In other words can it fall back to Layer 4 if its Lay...

Finding the length of a strength in an nginx.conf file

I am having a problem with my $memcached_keys being too long in my .conf file for nginx. I am using the memcached module but some of my urls are too long. I am in the process of trying to user MD5 hashes of the urls instead but in the meantime I was just wondering if there was a way I could check on the length of a string stored in a v...