Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service: Nginx #16

Closed
simbora opened this issue Aug 19, 2014 · 0 comments
Closed

Service: Nginx #16

simbora opened this issue Aug 19, 2014 · 0 comments

Comments

@simbora
Copy link
Owner

simbora commented Aug 19, 2014

Install (we're installing nginx + passenger actually):

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
gpg --armor --export 561F9B9CAC40B2F7 | sudo apt-key add -

Create /etc/apt/sources.list.d/passenger.list with:

deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main

IMPORTANT:boom: : The above is OS dependent and it considers Ubuntu 14.04 LTS...

Run

sudo chmod 600 /etc/apt/sources.list.d/passenger.list
sudo apt-get update
sudo apt-get install nginx-extras passenger

/etc/nginx/nginx.conf

Update:

- user www-data;
+ user deploy;

Add into http {} (actually, I have commented them out):

gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /usr/bin/ruby;

Add into http {}

# Detect when HTTPS is used
map $scheme $fastcgi_https {
    default off;
    https on;
}

Start it

service nginx start

Bind on change

service nginx restart
@simbora simbora changed the title Module: Nginx Service: Nginx Aug 19, 2014
@rxaviers rxaviers added this to the Services deployment milestone Aug 19, 2014
@dzydzany dzydzany mentioned this issue Nov 17, 2014
dzydzany added a commit that referenced this issue Apr 8, 2015
- Install nginx and passenger, add repos and key.
- Configure gzip and Passenger for Nginx.
- Map https connections in Nginx.

Fixes #16
Closes #38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants