nginx

Multiple rack apps on nginx + passenger, one as root, the other not...config help

So I've got two apps I want to run on a server. One app I would like to be the "default" app--that is, all URLs should be sent this app by default, except for a certain path, lets call it /foo: http://mydomain.com/ -> app1 http://mydomain.com/apples -> app1 http://mydomain.com/foo -> app2 My two rack apps are installed lik...

How to configure nginx for JBoss?

How would I configure nginx to handle static content and delegate or pass dynamic content to JBoss? Thank you. ...

How to match a string which doesn't contain a dot (.) using regular expression ?

How to match a string which doesn't contain a dot (.) using regular expression ? ...

php info not effect when edit value in php.ini on nginx webserver

I've already installed php, fcgi, nginx, the system running as no problem, but the problem happen when: I update memory_limit in php.ini, then restart php-cgi, nginx, but when use phpinfo, theo memory_limit is not effected. I install 2 new extensions: curl and memcache, add 2 lines: extension=curl.so and extension=memcache.so, restart ...

How do I get killed using Perl FCGI?

I'm having a little problem with nginx and the Perl FCGI module. I have a long operation in my FCGI program that may outlive the server (or the user on the server) on the other end of the Unix socket I'm using to communicate FCGI. I need the FCGI accept() loop in my program to break if the FCGI request is closed. I tried installing INT, ...

nginx + vbulletin cookie problem

Hello. I installed a forum vbulletin 3.8.4 .. When trying to load my apache is not set cookie 'userid' and 'password'. Although other cookie 'bblastactivity', 'bblastvisit', 'bbsessionhash' sets .. Help please ...

How do I configure nginx to have a Rails app at a domain and WordPress at /blog/ ?

I've got a Rails app deployed via nginx/passenger. It will have multiple domains pointing to it. I'm wondering if it's possible to configure nginx so that any URL that matches [somedomain.com]/blog/ will be servered by PHP/WordPress located in a different directory. So, for example: domain1.com, domain2.com, & domain2.com/some-resou...

Can nginx forward to Pylons, ignore response, return alternate response?

Hi All, One of my URLs is for a tracking cookie. In the basic configuration, the pylons controller parses the query string, does a DB query, and sets the cookie accordingly. I want to move to nginx. I am wondering if this is possible: nginx fetches value of cookie from memcached nginx writes the headers and serves static file nginx r...

Rails 3 x_sendfile on heroku

Hi, Rails 3 allow to send static files directly and more performantly to HTTP clients and bypassing your app server process (as described see http://john.guen.in...) send_file '/path/to.png', :x_sendfile => true, :type => 'image/png' I want to deploy my app on heroku. heroku use Nginx 0.6.32 (see http://docs.heroku.com/aspen). Does...

nginx doesn't parse php request

env: ubuntu 9.10 / use gotdeb source / php version 5.3.1 / php5-fpm installed / php5-fpm is running , and listening 9000 port test by 2 commands below pgrep php5-fpm telnet localhost 9000 however if I visit from anthor computer in LAN ,using this address http://192.168.1.103/index.php the browser ask me to save this index.php , b...

php process forking and get the child process id

Hi all, Objective: My script will download a remote file upon form submission, since the file might be big, I would like to fork off a process and let the user go on with his/her life. Example of a command: wget -q --limit-rate=1k --tries=10 "http://helios.gsfc.nasa.gov/image_euv_press.jpg" -O /web/assets/content/image/image_euv_press...

NGINX : Allow users to password protect directories themselves?

To my knowledge Nginx can only password protect directories from within the configuration file(s). That works nicely, but is not a real option for end-users who A) can not edit the configs and B) would break the configs if they could Right now I am thinking about a webbased representation of the directory structure where they can point ...

Speeding up site using gzip and far-future expiration dates.

I recently deployed a site http://boardlite.com . One of the tester websites http://www.gidnetwork.com/tools/gzip-test.php suggests that gzip is not enabled for my site. YSlow gives an A grade for Gzip but does not mention that gzip is on. How do I make sure the site properly implements Gzip. I am also going to enable far-future expiry ...

Can nginx be used as a reverse proxy for a backend websocket server?

We're working on a Ruby on Rails app that needs to take advantage of html5 websockets. At the moment, we have two separate "servers" so to speak: our main app running on nginx+passenger, and a separate server using Pratik Naik's Cramp framework (which is running on Thin) to handle the websocket connections. Ideally, when it comes time f...

Why does Rails with Passenger/nginx only works in development mode? No logs available

Hey folks, I have a serious problem with one of our webservers... after having an internal alpha-testing with a mongrel/haproxy-cluster that worked well, we wanted to use nginx with passenger for our first production server (customers will access this server). However, I can only run the rails app via development mode with passenger/ng...

Nginx proxy_pass without parameters

Hi I'm trying to proxy http://mydomain.com/ => 127.0.0.1:4567 but http://mydomain.com/FOO => 127.0.0.1:3000 Is that possible? So far I have: upstream myserver { server 127.0.0.1:4567; server 127.0.0.1:4568; } location / { proxy_pass http://myserver; } location /FOO/ { proxy_pass http://127.0.0.1:3000; } But th...

NGINX, Unicorn, Mediatemple dv server

Anyone every try to set up nginx & unicorn for their rails apps on a mediatemple dv server? Did you document it? ...

Nginx rewrite for link shortener and Wordpress

I'm a complete newbie to Nginx, so much so that I followed a online guide to do most of my server setup. I'm trying to learn but I'm still a ways away from understanding it all. So what I'm trying to create is a link shortener that redirects (example.com/x) to (example.com/short.php?id=x). Keep in mind that I'm also running a Wordpress ...

Converting Mod-rewrite rules which use %(QUERY_STRING) to NGINX rewrite format?

I've been stuck the last few days trying to convert the following Apache/Mod_Rewrite rewrite rule to NGINX format. Anyone know where I am going wrong? MOD_REWRITE: RewriteCond %{QUERY_STRING} topic=([0-9]+) RewriteRule /forum/index\.php /forum/vbseo301.php?action=thread&oldid=%1 [L] NGINX: location /forum/index.php { if (...

How do i convert this Mod_rewrite rule to nginx

This is the Htacces rule: RewriteEngine on RewriteRule ^([A-Za-z0-9-]+)/?$ ir.php?id=$1 how should I pass it to a Nginx compliant rewrite rule... i read the doc and did this: rewrite ^([A-Za-z0-9-]+)/?$ ir.php?id=$1 last; But didnt work. and another question: Is there any equivalent of .htaccess to Nginx (per directory rules) Thank...