nginxjenkinsubuntu-18.04

Jenkins: This site cannot be reached


I set up a DigitalOcean server running ubuntu 18.04 and am trying to run Jenkins on it. I followed the instructions to the letter in this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-18-04

which works perfectly until Step 4. When I enter: http://your_server_ip_or_domain:8080

substituting the DigitalOcean ip for "your_server_ip_or_domain", of course, the browser says "This site cannot be reached". Every step before that worked perfectly. The firewall is open to it.

I also made sure the JRE was installed.

EDIT: I read in another tutorial that Jenkins does not support Java 10 or 11, so I removed Java 11 and installed Java 8, and followed this tutorial: https://linuxize.com/post/how-to-install-jenkins-on-ubuntu-18-04/

I also installed a web server using the following command:

sudo apt-get install nginx

Same error whether I put the ipaddress in the browser or ipaddress:80 or ipaddress:8080. I can ping the ip from outside the network ok. Any ideas?


Solution

  • I figured it out. Nginx is listening on port 80 so you need to open the firewall to that port as well. Use the following command:

    sudo ufw allow 80
    

    Now I can get the default web page for nginx by using ipaddress:80 and jenkins by entering ipaddress:8080