From 674fbcfb1470888068d394e6f95bab399d762c9b Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Wed, 14 Feb 2018 16:53:55 +0100 Subject: [PATCH 1/2] Update DEPLOYMENT.md --- DEPLOYMENT.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 1159e277..1dca68d3 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -41,14 +41,31 @@ Change the default URL options' `:host` in `config/environments/production.rb` t Edit `~/nginx/conf/nginx.conf` like so: ``` -server { +daemon off; +worker_processes 1; +events { + worker_connections 1024; +} + +http { + set_real_ip_from 127.0.0.1; + set_real_ip_from ::1; + real_ip_header X-Forwarded-For; + include mime.types; + passenger_root /home/ACCOUNT/.gem/ruby/2.4.0/gems/passenger-5.2.0; + default_type application/octet-stream; + server { + passenger_ruby /package/host/localhost/ruby-2.4.3/bin/ruby; listen PORT; # Choose an open port (see instructions below)! server_name ACCOUNT.SERVER.uberspace.de; - root /home/ACCOUNT/rails/current/public; + root /home/ACCOUMNT/rails/current/public; passenger_enabled on; - + # Be sure to remove or comment the `location / { ... }` block! + } } + + ``` - To check whether a port is open, execute `netstat -tulpen | grep :PORT`: empty output means the port is open, otherwise the blocking process is displayed. @@ -182,4 +199,4 @@ Thunderbird: ## Additional information -- If you ever have to inspect server logs, they're here: `/home/ACCOUNT/nginx/logs/error.log` \ No newline at end of file +- If you ever have to inspect server logs, they're here: `/home/ACCOUNT/nginx/logs/error.log` From 4ec9fcbc498d72bb554c785d841e8f671b945623 Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Thu, 15 Feb 2018 14:04:49 +0100 Subject: [PATCH 2/2] clean up --- DEPLOYMENT.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/DEPLOYMENT.md b/DEPLOYMENT.md index 1dca68d3..d647654a 100644 --- a/DEPLOYMENT.md +++ b/DEPLOYMENT.md @@ -42,30 +42,30 @@ Edit `~/nginx/conf/nginx.conf` like so: ``` daemon off; -worker_processes 1; +worker_processes 1; + events { - worker_connections 1024; + worker_connections 1024; } http { set_real_ip_from 127.0.0.1; set_real_ip_from ::1; real_ip_header X-Forwarded-For; - include mime.types; - passenger_root /home/ACCOUNT/.gem/ruby/2.4.0/gems/passenger-5.2.0; - default_type application/octet-stream; + include mime.types; + passenger_root PASSENGER_ROOT_PATH; # passenger-config --root + default_type application/octet-stream; + server { - passenger_ruby /package/host/localhost/ruby-2.4.3/bin/ruby; + passenger_ruby RUBY_PATH; # which ruby listen PORT; # Choose an open port (see instructions below)! server_name ACCOUNT.SERVER.uberspace.de; - root /home/ACCOUMNT/rails/current/public; + root /home/ACCOUNT/rails/current/public; passenger_enabled on; - + # Be sure to remove or comment the `location / { ... }` block! } } - - ``` - To check whether a port is open, execute `netstat -tulpen | grep :PORT`: empty output means the port is open, otherwise the blocking process is displayed.