Actions
Setting up Nginx + Passenger » History » Revision 2
« Previous |
Revision 2/7
(diff)
| Next »
Kevin Cormier, 01/11/2013 12:10 PM
Setting up Nginx + Passenger¶
Passenger packages/repos are available at http://passenger.stealthymonkeys.com/
Install packages
# yum install -y nginx-passenger
Create self signed certificate
# cd /etc/nginx/ # openssl genrsa -des3 -out server.key 1024 # openssl req -new -key server.key -out server.csr # cp server.key server.key.org # openssl rsa -in server.key.org -out server.key # openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Make a local copy of the apps `public` directory (local to rails, as nginx/passenger doesn't seem to like symbolic links)
# cd /usr/share/foreman # rm public # cp -a /var/lib/foreman/public .
Add to `/etc/nginx/nginx.conf`:
env PATH;
Create foreman application config file `/etc/nginx/conf.d/foreman.conf`:
server { listen 443; server_name _; ssl on; ssl_certificate /etc/nginx/server.crt; ssl_certificate_key /etc/nginx/server.key; access_log /var/log/nginx/foreman_access.log; error_log /var/log/nginx/foreman_error.log debug; root /usr/share/foreman/public; passenger_enabled on; passenger_user foreman; passenger_group foreman; #location / { #} }
Updated by Kevin Cormier almost 12 years ago · 7 revisions