nginx

What is correct nginx location rules to match only the first path element in the URI to the CGI executable?

I am using a FreePascal web module designed for apache cgi-bin with nginx. The CGI itself is called spidersample.cgi and contains modules such as hello, bye etc. With Apache when spidersample.cgi/hello is called, spidersample.cgi gets executed, and passes control to the hello subroutine it contains. With nginx instead of executing sp...

Organizing Django + Static Website Folder Hierarchy

I'm currently working on developing a personal Django site that will consist of various technologies / subdomains. My main page(s) will be Django, with a blog.blah.com subdomain that runs wordpress, and several other subdomains for projects (project1.blah.com, project2.blah.com), that are static HTML files (created with Sphinx). I'm hav...

I lost nginx.pid,it disappeared.

Here is part of my nginx.conf: pid /www/nginx0836/nginx.pid; While I restart nginx,in several seconds I run ls in /www/nginx0836,I saw nginx.pid,that is right. But after several seconds,I run ls in /www/nginx0836 again,nginx.pid was lost. Why? By the way,nginx server works well and when I run "ps -ef | grep "nginx: master proce...

NGINX route all requests for images to external server

I would like to route all requests to my nginx server for jpg/png images to another external internet server which actually holds the images. What would the rewrite look like? This is mostly for development so I'm not worried about the overhead of doing this. Then again, perhaps there is none. Both servers are mine so this isn't a reque...

How to configure nginx to enable unix user's location ?

Hi, I would like to enable personal web account for each unix account of my server. For exemple, I would like to be able to have http://IP/user1, and http://IP/user2. I have tryed this but it doesn't work. server { listen 82; server_name localhost; passenger_enabled off; location ~ ^/(.*)$ { alias /home/$1/www/; index...

nginx be both reverse proxy and web server

I currently use nginx with passenger to serve my rails app. considering including a caching reverse proxy to the equation. Can I use the same instance of nginx as a reverse proxy (running on port 80, serving static as well as e-tagged actions) as well or would I need a different instance of nginx or a totally different type of reverse pr...

Is it possible to serve static files with nginx/ubuntu from an nfs mount?

I've been getting "403 permission denied" while using a nfs mount. Any ideas? NB: Disabled sendfile. ...

How many NGinx redirects is too many?

I'm working on a news centric website thats been around for years and is steadily accruing more and more page redirects. Currently we have around 375 redirects and are adding about 5-10 a month. I know that NGinx is very, very fast at handling redirects, but presumably there must be some number of redirects that will affect performan...

Having some issues streaming videos to JW Player using Nginx

I've compiled Nginx with the H264 streaming module and tested it using: wget http://cdn.mydomain.com/video.m4v?start=10 The file returned has the first 10 seconds chopped off it. So I know Nginx is successfully streaming the video. On my website, I have JW Player 4.5 setup using the following code: var time = false; var player = f...

Python webapp - moving from testing to production

I've made a small web app using web.py that I now want to put into production. I dont anticipate this will have very high concurrent use (probably max of 5 or so users at any given time, if that). That said, I dont want to go with the cherry.py server that comes with web.py (and which i have been using for debugging), because one of my ...

Where is the Phusion Passenger config file

Where is the apache module installed for Phusion Passenger. I want to adjust some of the config values here - http://www.modrails.com/documentation/Users%20guide%20Apache.html#_configuring_phusion_passenger and I don't know where this config file is. I've installed everything like this doc says for nginx. ...

Nginx gives a 403 error for CSS/JS files

I have setup nginx 0.7.67 on Ubuntu10.10 along with php-cli . I'm trying to get my front-controller based PHP framework to run, but all pages except index.php give a 403 error. Ex : http://mysite.com/styles/style.css - 403 Forbidden http://mysite.com/scripts/script.css - 403 Forbidden http://mysite.com/index.php - Works My /etc/ngin...

Running old site on apache + php and new nginx rails side by side

Hi all My current site is running on a dedicated server on apache + php. I am creating my new site in rails and running on nginx. I want to run both sites together for a while while i slowly redirect all pages SEO rank etc to new site. My current site has say domain www.mydomain.com and new site will have www.mydomain.com/en infront ...

Nginx, FastCGI and Django connection refused error

I've setup nginx, fastcgi and django. The run my django project through fastcgi using: python26 manage.py runfcgi host=127.0.0.1 port=8080 --settings=settings When I visit http://127.0.0.1 I can see the normal django 404 since I haven't setup everything on my django project aside from the admin. So I tried visinting http://127.0.0.1/a...

Who can one separate static from dynamic requests with Nginx + Passenger

I would like to separate the request for static files from those handled by passenger. In Nginx one can log per "location" as far as I know, and that works fine for me. I have a global log and log per server. However I would also like to separate my logs based on request that are handled by passenger and those that are statically serve...

How can I remove index.php from the address while redirect requests to index.php via fastcgi?

I have a basic Magento (PHP app, using index.php as the controller) setup on an Ubuntu server. I configured NGINX to use PHP-CGI to serve all PHP pages. While the site is working as expected, all the URLs are of the form: http://domain.com/index.php/apparel/shoes.html Is there a way to use the nginx rewrite setting so that I can have the...

Capistrano + NGINX Passenger Restart Rails App

Hey Guys. I've finally gotten capistrano to work on my website, however, I cannot seem to get the restart part of the application to work. What I want todo is setup capistrano to restart the mongrel cluster that is running the rails app after a deploy has gone through. Since I used passenger to install everything, I have no clue how to ...

Removing Rails/Spree image upload limit?

My client called today because they couldn't upload their images to their shopping site, and I have absolutely no idea where the upload file size limits are configured. So here's my server configuration: Ubuntu 10.04LTS, Spree on Rails 2.3, Nginx. Basically I want to remove the file-size upload limit. Anyone know where I should go to ...

Having trouble using uwsgi with Django and nginx

So far, I have: I recompiled my nginx package with uwsgi ( 0.7.67 ) Copied over my uwsgi to sbin via sudo cp uwsgi /usr/local/sbin Copied uwsgi params via sudo cp nginx/uwsgi_params /etc/nginx $ sudo mkdir -p /usr/local/nginx/uwsgi_temp Created a virtualhost in sites-available and symlinked in sites-available. File is: server { ...

Nginx connection reset, response from uWsgi lost

I have a django app hosted via Nginx and uWsgi. In a certain very simple request, I get different behaviour for GET and POST, which should not be the case. The uWsgi daemon log: [pid: 32454|app: 0|req: 5/17] 127.0.0.1 () {36 vars in 636 bytes} [Tue Oct 19 11:18:36 2010] POST /buy/76d4f520ae82e1dfd35564aed64a885b/a_2/10/ => generated 80...