0

The following is my nginx configuration:

user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
  worker_connections 768;
  multi_accept on;
}
http {
  server {
    listen 80;
    listen 443 ssl;

    server_name www.trophus.com;
    ssl_certificate /etc/ssl/SSL.crt;
    ssl_certificate_key /etc/ssl/www_trophus_com.key;

    location / {
      root /var/www;
    }
  }
}

At /var/www, there is 1 index.html file just as a test.

Background: I'm using a framework called Phoenix (phoenixframework.org) and when I run my server on port 4000 it works as planned because last night I changed my IP tables to redirect traffic from 80 to 4000. After a while this was problematic so I flushed my iptables, which then messed up my ability to ssh into my DigitalOcean instance (I'm a real genius as you can tell). After fixing this from the VNC console, I decided to actually read the documentation. Even though nginx is a reverse proxy server, I am assured that I could indeed serve a static index.html file as a test. In the end I just want my website to be able to serve my app running on port 4000 as port 80, with an SSL certificate working.

However, I'm trying to get SSL to work on port 443 and now I can't even serve any content over http over 80 so yeah, trying to get it to work.

5
  • 1
    And what exactly error is?
    – Alexey Ten
    Jun 25, 2015 at 18:37
  • ERR_CONNECTION_REFUSED Jun 25, 2015 at 18:40
  • 1
    Probably it's your firewall/iptables/etc
    – Alexey Ten
    Jun 25, 2015 at 18:47
  • What OS? Does SSH work again?
    – 030
    Jun 25, 2015 at 19:30
  • I agree with @AlexeyTen the problem is most likely something to do with your firewall. Jun 28, 2015 at 20:41

0

You must log in to answer this question.

Browse other questions tagged .