nginx website on Ubuntu 18 not loading on public IPNode.js + Nginx - What now?nginx web directory changeMy NIGINX server is down. How do I restart it? I am fairly new to NGINX and CentOSreinstall nginx if i delete /etc/nginx in centos server how to reinstall it again i am new in centos and nginxUnable to start Nginx server in ubuntu servercentos 7: nginx Failed to read PID from file /run/nginx.pid: Invalid argumentDjango-Gunicorn-Nginx deployement doesn't get past Nginxinstall nginx for valet on ubuntuNgnix Can not start serviceCan't start MySQL on Fedora 29

Hostile work environment after whistle-blowing on coworker and our boss. What do I do?

Implement the Thanos sorting algorithm

How will losing mobility of one hand affect my career as a programmer?

Increase performance creating Mandelbrot set in python

Personal Teleportation as a Weapon

Teaching indefinite integrals that require special-casing

Trouble understanding overseas colleagues

How do I keep an essay about "feeling flat" from feeling flat?

Is there an Impartial Brexit Deal comparison site?

What's a natural way to say that someone works somewhere (for a job)?

What to do with wrong results in talks?

Modify casing of marked letters

Efficiently merge handle parallel feature branches in SFDX

There is only s̶i̶x̶t̶y one place he can be

Products and sum of cubes in Fibonacci

Are there any comparative studies done between Ashtavakra Gita and Buddhim?

Why are on-board computers allowed to change controls without notifying the pilots?

How can I use the arrow sign in my bash prompt?

Can I use my Chinese passport to enter China after I acquired another citizenship?

Why does John Bercow say “unlock” after reading out the results of a vote?

Coordinate position not precise

Print name if parameter passed to function

Everything Bob says is false. How does he get people to trust him?

How does it work when somebody invests in my business?



nginx website on Ubuntu 18 not loading on public IP


Node.js + Nginx - What now?nginx web directory changeMy NIGINX server is down. How do I restart it? I am fairly new to NGINX and CentOSreinstall nginx if i delete /etc/nginx in centos server how to reinstall it again i am new in centos and nginxUnable to start Nginx server in ubuntu servercentos 7: nginx Failed to read PID from file /run/nginx.pid: Invalid argumentDjango-Gunicorn-Nginx deployement doesn't get past Nginxinstall nginx for valet on ubuntuNgnix Can not start serviceCan't start MySQL on Fedora 29













-1















I am trying to host a website via nginx on Amazon AWS EC2 Ubuntu 18.04. I started by following this tutorial. I ran sudo apt update and sudo apt install nginx. Then, I ran sudo ufw allow 'Nginx HTTP'. Running sudo ufw status returned the following;



Status: active

To Action From
-- ------ ----
Nginx HTTP ALLOW Anywhere
OpenSSH ALLOW Anywhere
Nginx HTTP (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)


After that I ran systemctl status nginx which returned:



● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
Docs: man:nginx(8)
Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code
Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
Main PID: 2661 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_pro
└─2663 nginx: worker process

Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web serv
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID f
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web serve
lines 1-15/15 (END)...skipping...
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
Docs: man:nginx(8)
Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 2661 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─2663 nginx: worker process

Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


I then tried to fix the Failed to parse PID from file /run/nginx.pid: Invalid argument error. I did that by doing mkdir /etc/systemd/system/nginx.service.d, then printf "[Service]nExecStartPost=/bin/sleep 0.1n" which returned




[Service]

ExecStartPost=/bin/sleep 0.1




After that I ran sudo nano /etc/systemd/system/nginx.service.d/override.conf and inserted the above quote into there and saved it. Then sudo systemctl daemon-reload and sudo systemctl restart nginx. After that running systemctl status nginx returned this:



● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/nginx.service.d
└─override.conf
Active: active (running) since Thu 2019-03-21 14:54:44 UTC; 16s ago
Docs: man:nginx(8)
Process: 2941 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 2957 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
Process: 2955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 2944 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 2956 (nginx)
Tasks: 2 (limit: 1152)
CGroup: /system.slice/nginx.service
├─2956 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─2962 nginx: worker process

Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Stopped A high performance web server and a reverse proxy server.
Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


I figured everything should be working now, so I ran curl localhost and that returned



<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;

</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>


I believe I should also be able to access this from my home PC, so I did curl ifconfig.me to get my public IP and then I went to http://PUBLICIP, but it said This site can’t be reached.



Can someone help me fix this please?



Thanks.










share|improve this question


























    -1















    I am trying to host a website via nginx on Amazon AWS EC2 Ubuntu 18.04. I started by following this tutorial. I ran sudo apt update and sudo apt install nginx. Then, I ran sudo ufw allow 'Nginx HTTP'. Running sudo ufw status returned the following;



    Status: active

    To Action From
    -- ------ ----
    Nginx HTTP ALLOW Anywhere
    OpenSSH ALLOW Anywhere
    Nginx HTTP (v6) ALLOW Anywhere (v6)
    OpenSSH (v6) ALLOW Anywhere (v6)


    After that I ran systemctl status nginx which returned:



    ● nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
    Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
    Docs: man:nginx(8)
    Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code
    Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
    Main PID: 2661 (nginx)
    Tasks: 2 (limit: 1152)
    CGroup: /system.slice/nginx.service
    ├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_pro
    └─2663 nginx: worker process

    Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web serv
    Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID f
    Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web serve
    lines 1-15/15 (END)...skipping...
    ● nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
    Docs: man:nginx(8)
    Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Main PID: 2661 (nginx)
    Tasks: 2 (limit: 1152)
    CGroup: /system.slice/nginx.service
    ├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
    └─2663 nginx: worker process

    Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
    Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
    Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


    I then tried to fix the Failed to parse PID from file /run/nginx.pid: Invalid argument error. I did that by doing mkdir /etc/systemd/system/nginx.service.d, then printf "[Service]nExecStartPost=/bin/sleep 0.1n" which returned




    [Service]

    ExecStartPost=/bin/sleep 0.1




    After that I ran sudo nano /etc/systemd/system/nginx.service.d/override.conf and inserted the above quote into there and saved it. Then sudo systemctl daemon-reload and sudo systemctl restart nginx. After that running systemctl status nginx returned this:



    ● nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/nginx.service.d
    └─override.conf
    Active: active (running) since Thu 2019-03-21 14:54:44 UTC; 16s ago
    Docs: man:nginx(8)
    Process: 2941 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
    Process: 2957 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
    Process: 2955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 2944 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Main PID: 2956 (nginx)
    Tasks: 2 (limit: 1152)
    CGroup: /system.slice/nginx.service
    ├─2956 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
    └─2962 nginx: worker process

    Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Stopped A high performance web server and a reverse proxy server.
    Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
    Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


    I figured everything should be working now, so I ran curl localhost and that returned



    <!DOCTYPE html>
    <html>
    <head>
    <title>Welcome to nginx!</title>
    <style>
    body
    width: 35em;
    margin: 0 auto;
    font-family: Tahoma, Verdana, Arial, sans-serif;

    </style>
    </head>
    <body>
    <h1>Welcome to nginx!</h1>
    <p>If you see this page, the nginx web server is successfully installed and
    working. Further configuration is required.</p>

    <p>For online documentation and support please refer to
    <a href="http://nginx.org/">nginx.org</a>.<br/>
    Commercial support is available at
    <a href="http://nginx.com/">nginx.com</a>.</p>

    <p><em>Thank you for using nginx.</em></p>
    </body>
    </html>


    I believe I should also be able to access this from my home PC, so I did curl ifconfig.me to get my public IP and then I went to http://PUBLICIP, but it said This site can’t be reached.



    Can someone help me fix this please?



    Thanks.










    share|improve this question
























      -1












      -1








      -1








      I am trying to host a website via nginx on Amazon AWS EC2 Ubuntu 18.04. I started by following this tutorial. I ran sudo apt update and sudo apt install nginx. Then, I ran sudo ufw allow 'Nginx HTTP'. Running sudo ufw status returned the following;



      Status: active

      To Action From
      -- ------ ----
      Nginx HTTP ALLOW Anywhere
      OpenSSH ALLOW Anywhere
      Nginx HTTP (v6) ALLOW Anywhere (v6)
      OpenSSH (v6) ALLOW Anywhere (v6)


      After that I ran systemctl status nginx which returned:



      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
      Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
      Docs: man:nginx(8)
      Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code
      Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
      Main PID: 2661 (nginx)
      Tasks: 2 (limit: 1152)
      CGroup: /system.slice/nginx.service
      ├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_pro
      └─2663 nginx: worker process

      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web serv
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID f
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web serve
      lines 1-15/15 (END)...skipping...
      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
      Docs: man:nginx(8)
      Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Main PID: 2661 (nginx)
      Tasks: 2 (limit: 1152)
      CGroup: /system.slice/nginx.service
      ├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
      └─2663 nginx: worker process

      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


      I then tried to fix the Failed to parse PID from file /run/nginx.pid: Invalid argument error. I did that by doing mkdir /etc/systemd/system/nginx.service.d, then printf "[Service]nExecStartPost=/bin/sleep 0.1n" which returned




      [Service]

      ExecStartPost=/bin/sleep 0.1




      After that I ran sudo nano /etc/systemd/system/nginx.service.d/override.conf and inserted the above quote into there and saved it. Then sudo systemctl daemon-reload and sudo systemctl restart nginx. After that running systemctl status nginx returned this:



      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/nginx.service.d
      └─override.conf
      Active: active (running) since Thu 2019-03-21 14:54:44 UTC; 16s ago
      Docs: man:nginx(8)
      Process: 2941 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
      Process: 2957 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
      Process: 2955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Process: 2944 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Main PID: 2956 (nginx)
      Tasks: 2 (limit: 1152)
      CGroup: /system.slice/nginx.service
      ├─2956 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
      └─2962 nginx: worker process

      Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Stopped A high performance web server and a reverse proxy server.
      Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
      Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


      I figured everything should be working now, so I ran curl localhost and that returned



      <!DOCTYPE html>
      <html>
      <head>
      <title>Welcome to nginx!</title>
      <style>
      body
      width: 35em;
      margin: 0 auto;
      font-family: Tahoma, Verdana, Arial, sans-serif;

      </style>
      </head>
      <body>
      <h1>Welcome to nginx!</h1>
      <p>If you see this page, the nginx web server is successfully installed and
      working. Further configuration is required.</p>

      <p>For online documentation and support please refer to
      <a href="http://nginx.org/">nginx.org</a>.<br/>
      Commercial support is available at
      <a href="http://nginx.com/">nginx.com</a>.</p>

      <p><em>Thank you for using nginx.</em></p>
      </body>
      </html>


      I believe I should also be able to access this from my home PC, so I did curl ifconfig.me to get my public IP and then I went to http://PUBLICIP, but it said This site can’t be reached.



      Can someone help me fix this please?



      Thanks.










      share|improve this question














      I am trying to host a website via nginx on Amazon AWS EC2 Ubuntu 18.04. I started by following this tutorial. I ran sudo apt update and sudo apt install nginx. Then, I ran sudo ufw allow 'Nginx HTTP'. Running sudo ufw status returned the following;



      Status: active

      To Action From
      -- ------ ----
      Nginx HTTP ALLOW Anywhere
      OpenSSH ALLOW Anywhere
      Nginx HTTP (v6) ALLOW Anywhere (v6)
      OpenSSH (v6) ALLOW Anywhere (v6)


      After that I ran systemctl status nginx which returned:



      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
      Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
      Docs: man:nginx(8)
      Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code
      Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
      Main PID: 2661 (nginx)
      Tasks: 2 (limit: 1152)
      CGroup: /system.slice/nginx.service
      ├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_pro
      └─2663 nginx: worker process

      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web serv
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID f
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web serve
      lines 1-15/15 (END)...skipping...
      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Active: active (running) since Thu 2019-03-21 14:30:31 UTC; 1min 17s ago
      Docs: man:nginx(8)
      Process: 2657 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Process: 2644 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Main PID: 2661 (nginx)
      Tasks: 2 (limit: 1152)
      CGroup: /system.slice/nginx.service
      ├─2661 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
      └─2663 nginx: worker process

      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument
      Mar 21 14:30:31 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


      I then tried to fix the Failed to parse PID from file /run/nginx.pid: Invalid argument error. I did that by doing mkdir /etc/systemd/system/nginx.service.d, then printf "[Service]nExecStartPost=/bin/sleep 0.1n" which returned




      [Service]

      ExecStartPost=/bin/sleep 0.1




      After that I ran sudo nano /etc/systemd/system/nginx.service.d/override.conf and inserted the above quote into there and saved it. Then sudo systemctl daemon-reload and sudo systemctl restart nginx. After that running systemctl status nginx returned this:



      ● nginx.service - A high performance web server and a reverse proxy server
      Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
      Drop-In: /etc/systemd/system/nginx.service.d
      └─override.conf
      Active: active (running) since Thu 2019-03-21 14:54:44 UTC; 16s ago
      Docs: man:nginx(8)
      Process: 2941 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
      Process: 2957 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
      Process: 2955 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Process: 2944 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
      Main PID: 2956 (nginx)
      Tasks: 2 (limit: 1152)
      CGroup: /system.slice/nginx.service
      ├─2956 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
      └─2962 nginx: worker process

      Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Stopped A high performance web server and a reverse proxy server.
      Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Starting A high performance web server and a reverse proxy server...
      Mar 21 14:54:44 ip-172-31-29-16 systemd[1]: Started A high performance web server and a reverse proxy server.


      I figured everything should be working now, so I ran curl localhost and that returned



      <!DOCTYPE html>
      <html>
      <head>
      <title>Welcome to nginx!</title>
      <style>
      body
      width: 35em;
      margin: 0 auto;
      font-family: Tahoma, Verdana, Arial, sans-serif;

      </style>
      </head>
      <body>
      <h1>Welcome to nginx!</h1>
      <p>If you see this page, the nginx web server is successfully installed and
      working. Further configuration is required.</p>

      <p>For online documentation and support please refer to
      <a href="http://nginx.org/">nginx.org</a>.<br/>
      Commercial support is available at
      <a href="http://nginx.com/">nginx.com</a>.</p>

      <p><em>Thank you for using nginx.</em></p>
      </body>
      </html>


      I believe I should also be able to access this from my home PC, so I did curl ifconfig.me to get my public IP and then I went to http://PUBLICIP, but it said This site can’t be reached.



      Can someone help me fix this please?



      Thanks.







      linux amazon-web-services ubuntu nginx amazon-ec2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 15:14









      J PJ P

      559




      559






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Problem was my AWS security groups, I added an inbound rule to accept all TCP and now it works.






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55283663%2fnginx-website-on-ubuntu-18-not-loading-on-public-ip%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Problem was my AWS security groups, I added an inbound rule to accept all TCP and now it works.






            share|improve this answer



























              0














              Problem was my AWS security groups, I added an inbound rule to accept all TCP and now it works.






              share|improve this answer

























                0












                0








                0







                Problem was my AWS security groups, I added an inbound rule to accept all TCP and now it works.






                share|improve this answer













                Problem was my AWS security groups, I added an inbound rule to accept all TCP and now it works.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 21 at 15:23









                J PJ P

                559




                559





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55283663%2fnginx-website-on-ubuntu-18-not-loading-on-public-ip%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Obelisk of Theodosius Contents History Description Notes Bibliography Further reading External links Navigation menuAge of spirituality : late antique and early Christian art, third to seventh centuryOver 60 picturesObelisks of the World41°00′21.24″N 28°58′31.43″E / 41.0059000°N 28.9753972°E / 41.0059000; 28.97539727724550-7235741376235741376

                    밀양 대씨 역사 각주 함께 보기 둘러보기 메뉴밀양 대씨

                    1973년 목차 사건 문화 탄생 사망 노벨상 달력 둘러보기 메뉴