Actions
Setting up Nginx + Passenger » History » Revision 1
Revision 1/7
| Next »
Rytis Sileika, 08/01/2012 10:18 AM
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; #location / { #} }
Updated by Rytis Sileika over 12 years ago · 7 revisions