Forgive the totally n00b question, but I'm pulling my hair out at this.
I followed this tutorial to deploy a rails app on an Ubuntu 18.04 headless server. I'm using Phusion Passenger and Nginx to serve it. It is currently running on port 80, with the application's source code sitting in the /home directory of one of the users on the machine. I have my router configured to expose port 80, routing all requests to that server. I am able to view my rails application in my browser using the IP address assigned to the server by my router, but I cannot access it via my external IP address. What am I doing wrong?
nginx.conf
application config
server {
listen 80;
listen [::]:80;
server_name _;
root /home/minecraft/rails_app/current/rails_app/public;
passenger_enabled on;
passenger_app_env production;
passenger_app_root /home/minecraft/rails_app/current/rails_app;
Allow uploads up to 100MB in size
client_max_body_size 100m;
location ~ ^/(assets|packs) {
expires max;
gzip_static on;
add_header Cache-Control public;
}
}
http-passenger-conf.d
### Begin automatically installed Phusion Passenger config snippet ###
passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
passenger_ruby /home/minecraft/.rbenv/shims/ruby;
### End automatically installed Phusion Passenger config snippet ###
nginx.conf
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# 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/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
sudo netstat -tanpl | grep nginx
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 13706/nginx: master
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13706/nginx: master
tcp6 0 0 :::8080 :::* LISTEN 13706/nginx: master
tcp6 0 0 :::80 :::* LISTEN 13706/nginx: master
sudo ufw status
Status: inactive