b43ac205b0
splitting into a multipackage, with a subpackage for the standalone version (which embeds a version of nginx). The standalone version operates much like other ruby webservers, serving a single ruby/rack application. Switch to using the gem version of passenger. Because the gem installs into a versioned directory, setup symlinks to the versioned directory so that nginx configuration files don't need to be modified when the version is updated.
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
# $OpenBSD: nginx-passenger.conf.sample,v 1.3 2011/12/13 18:38:17 jeremy Exp $
|
|
#
|
|
# Example nginx.conf for Phusion Passenger
|
|
#
|
|
# Please read the official Phusion Passenger user guide for nginx.
|
|
# http://www.modrails.com/documentation/Users guide Nginx.html
|
|
|
|
user _nginx;
|
|
worker_processes 1;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
keepalive_timeout 65;
|
|
|
|
# The passenger root. (passenger-config --root)
|
|
passenger_root ${PASSENGER_ROOT};
|
|
|
|
# Some more
|
|
passenger_log_level 1;
|
|
passenger_ruby ${RUBY};
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
passenger_enabled on; # actually enable passenger for this vhost
|
|
rails_env production; # set the RAILS_ENV
|
|
|
|
# Path to the public folder of your rails app.
|
|
root /var/nginx/app/public;
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
}
|
|
}
|