var/www

Rob Schultz rschultz7 at gmail.com
Wed Dec 30 03:31:56 MSK 2009


Paul,
This is an example of trimmed down passenger setup i am using with nginx

http {
        #passenger stuff
        passenger_root /opt/ree/lib/ruby/gems/1.8/gems/passenger-2.2.7;
        passenger_ruby /opt/ree/bin/ruby;

	server {
	        listen          80;
	        server_name     domain.com;

	        access_log      /var/log/nginx/domain.com.access_log main;
	        error_log       /var/log/nginx/domain.com.error_log info;

	        root /var/www/domain.com/public;

	        passenger_enabled on;

	        location ~* ^.+\.(jpg|jpeg|gif|png)$ {
	                access_log   off;
	                expires      30d;
	        }
	}
}

V/r,
Rob Schultz
On Dec 29, 2009, at 6:16 PM, Paul Jessup wrote:

> Rob Schultz wrote:
>> What's your config look like? And did you flush the browsers cache?
> 
> Hello Rob,
> 
> in between posting the question and your lightening reply, I found the 
> problem - nginx put the files into a sub-folder of var/www, so I just 
> moved them - need an embarrassed emoicon here... :)
> 
> However, I have tried to get a local rails app working (it does on 
> web-brick), but without success - can't get a reply on 
> localhost/testdir/testrhtml say. Could you please tell me if this looks 
> right in the conf file?
> 
>   server {
>      listen 80;
>      server_name localhost;
>      root /home/me/sites/my_app/public;   # <--- be sure to point to 
> 'public'!
>      passenger_enabled on;
>   }
> 
> Kind regards
> -- 
> Posted via http://www.ruby-forum.com/.
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx




More information about the nginx mailing list