We're trying out using Discord. Check the thread for the link. These forums will continue to operate as normal.

Reverse Proxy Stopped working

Reverse proxy seems to have stopped working and I'm not sure where to look to debug. Going to my VM's ip address port 80 takes me to "Apache2 Ubuntu Default Page". all the other pages /Plex /Sonarr etc return not found. Thoughts?
    No results for this poll

Comments

  • example:

    Not Found

    The requested URL /plex was not found on this server.


    Apache/2.4.18 (Ubuntu) Server at 192.168.1.100 Port 80
  • Did some digging but I'm at a loss. Right now I can't even get to <ip address>/setup

    Based on this thread: http://www.openflixr.com/forum/discussion/353/webpage-cannot-be-displayed-after-initial-setup

    let's encrypt might be responsible but I have not used let's encrypt. 

    openflixr@openflixr:/etc/init.d$ systemctl status nginx.service
    œ nginx.service - A high performance web server and a reverse proxy server
       Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Wed 2018-06-20 03:53:03 CEST; 13s ago
         Docs: man:nginx(8)
      Process: 84714 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

    Jun 20 03:53:03 openflixr systemd[1]: Starting A high performance web server and a reverse proxy server...
    Jun 20 03:53:03 openflixr nginx[84714]: nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/reverse
    Jun 20 03:53:03 openflixr nginx[84714]: nginx: configuration file /etc/nginx/nginx.conf test failed
    Jun 20 03:53:03 openflixr systemd[1]: nginx.service: Control process exited, code=exited status=1
    Jun 20 03:53:03 openflixr systemd[1]: Failed to start A high performance web server and a reverse proxy server.
    Jun 20 03:53:03 openflixr systemd[1]: nginx.service: Unit entered failed state.
    Jun 20 03:53:03 openflixr systemd[1]: nginx.service: Failed with result 'exit-code'.
  • I have encountered the same problem. It looks like nginx was updated (to 1.15.0-0+xenial0), and included in that update (according to http://mailman.nginx.org/pipermail/nginx-announce/2018/000212.html) is the following change:

        *) Change: now nginx detects missing SSL certificates during configuration testing when
           using the "ssl" parameter of the "listen" directive.
    
    I believe that change has broken things, as the nginx error seems to indicate, and there doesn't seem to be any SSL cert installed as far as I can find.
  • yep nginx and libnginx were both updated over the last 24 hours. Mine is dead.
    Based on conradb's comment I'm hoping i'll find a way to stop the listening on https/443 as that seems an easier way forward than trying to generate a cert lol
  • edited June 2018
    OK mine's working again by disabling the ssl listener directive in the nginx conf file, but due to various tweaks I'd done on my system I'm not 100% of the instructions.

    Here's what I think you'll need to do:
    1. SSH onto the openflixr box or get onto the VM's console
    2. Once logged in, become root ("sudo su -")
    3. cd /etc/nginx/sites-enabled/
    4. check out the files in there, there might be one, or one symlink, or several. Mine was called "reverse". If you've monkeyed around in here before, you'll know which file to edit. If not, then edit the file called "reverse".
    5. Scroll down about a page to the entries that start "listen"
    6. Comment out the 2nd line that says "listen 443 ssl https2" by inserting a "#" at the beginning of it
    7. Save and exit
    8. start nginx ("/etc/init.d/nginx start" or "systemctl start nginx")
    That should be all you need.
    I'll post another entry if I ever bother to figure out how to generate an ssl certificate.

  • OK I did an SSL cert, but it's not for the faint of heart.
    I can't list the steps coz I messed it up several times and I'm not really sure what I did in the end.
    Here's the resources I used to get it working:
    • check your nginx config using "nginx -t" to make sure things look ok
    • use "nginx -s reload" to make your new config live without having to do a full service stop/start
    • hint; you'll need to disable or comment out the lines about ssl_stapling if you're using a self-signed cert
    • Great info on making a cert for nginx, make sure to read through the comments for improvements including 1-liner commands: https://gist.github.com/jessedearing/2351836
    • Good info on troubleshooting nginx and certificate configuration, although this guy's fault is unrelated: https://serverfault.com/questions/844161/ssl-ngnix-no-ssl-certificate-is-defined-in-server-listening-on-ssl-port-whi
    • Good info on how to use an openssl conf file to specify alternate DNS names (a SAN cert) if that's what you want to achieve, but you'll need to merge this info with the info in the github link above to get all the certs in the right form and place

  • jeremywho said:
    OK mine's working again by disabling the ssl listener directive in the nginx conf file, but due to various tweaks I'd done on my system I'm not 100% of the instructions.

    Here's what I think you'll need to do:
    1. SSH onto the openflixr box or get onto the VM's console
    2. Once logged in, become root ("sudo su -")
    3. cd /etc/nginx/sites-enabled/
    4. check out the files in there, there might be one, or one symlink, or several. Mine was called "reverse". If you've monkeyed around in here before, you'll know which file to edit. If not, then edit the file called "reverse".
    5. Scroll down about a page to the entries that start "listen"
    6. Comment out the 2nd line that says "listen 443 ssl https2" by inserting a "#" at the beginning of it
    7. Save and exit
    8. start nginx ("/etc/init.d/nginx start" or "systemctl start nginx")
    That should be all you need.
    I'll post another entry if I ever bother to figure out how to generate an ssl certificate.

    Thanks so much for this. Looks like I'm back in business.
  • jeremywho said:
    OK I did an SSL cert, but it's not for the faint of heart.
    I can't list the steps coz I messed it up several times and I'm not really sure what I did in the end.
    Here's the resources I used to get it working:
    • check your nginx config using "nginx -t" to make sure things look ok
    • use "nginx -s reload" to make your new config live without having to do a full service stop/start
    • hint; you'll need to disable or comment out the lines about ssl_stapling if you're using a self-signed cert
    • Great info on making a cert for nginx, make sure to read through the comments for improvements including 1-liner commands: https://gist.github.com/jessedearing/2351836
    • Good info on troubleshooting nginx and certificate configuration, although this guy's fault is unrelated: https://serverfault.com/questions/844161/ssl-ngnix-no-ssl-certificate-is-defined-in-server-listening-on-ssl-port-whi
    • Good info on how to use an openssl conf file to specify alternate DNS names (a SAN cert) if that's what you want to achieve, but you'll need to merge this info with the info in the github link above to get all the certs in the right form and place

    Thank you, this really saved my day!
  • I’m investigating. 
  • Thx for the tip. Noticed today that the landing page wouldn't load, but IP:port for CP, NZBget and Qbit were loading just fine. I've put a # in front of the "443" line and after a restart it was working again. What caused this problem in the first place, since everything was working fine?
  • An update of nginx, where they fixed a config conflict where you could specify port 443 to be used but could leave out the certificate directions, creating a config that would be open to interpretation as to what the behaviour should be.  So they enforced the cert requirement, and we don't have any certs installed by default.
  • edited October 2018
    just got this same problem myself. however, after commenting out the 443 line still does'nt work. same after commenting out every ssl line in the config. now i get an error saying: error port 80 is already in use.

    i tried to update the whole thing. but the update script is just looping because it is not able to start the nginx service.
  • You can test nginx's config files at a ssh command prompt, with
    nginx -t
    or
    nginx -T
    You've probably got a syntax error in there if you did big surgery.
    If you can't find it, post it up here (or in pastebin)
    When posting code or logs, use the "code" markup format option under the backwards P thing in the text box toolbar.
  • AHH Help please. I have done everything that has been said did once work not sure what changed after a reboot.

    invalid number of arguments in "auth_basic" directive in /etc/nginx/sites-enabled/reverse:360
    nginx: configuration file /etc/nginx/nginx.conf test failed

  • Post your config, in pastebin I guess and link here
  • would be amazing if you could help please see link below

    https://pastebin.com/K8KYGTEA


  • jeremywho said:
    Post your config, in pastebin I guess and link here
    would be amazing if you could help please see link below

    https://pastebin.com/K8KYGTEA
  • reno306 said:
    jeremywho said:
    Post your config, in pastebin I guess and link here
    would be amazing if you could help please see link below

    https://pastebin.com/K8KYGTEA

    Help Please??
  • Sorry @reno306 I've been away.
    Is this still a problem??
Sign In or Register to comment.