PESolut / my-resume

my-resume-repo
0 stars 0 forks source link

Inspect Nginx configuration (if used): #62

Closed PESolut closed 4 weeks ago

PESolut commented 1 month ago

This sub-ticket focuses on inspecting the Nginx configuration to troubleshoot the "Connection Refused" error encountered when accessing the deployed site through the custom domain. The Docker setup is confirmed to be functioning since the site renders correctly using the AWS Elastic IP. However, there could be a misconfiguration in Nginx contributing to the issue.

Tasks:

Acceptance Criteria:

PESolut commented 1 month ago

task verify nginx config files..

confirmation of no nginx syntax errors

[ec2-user@ip-172-31-27-183 ~]$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

lets look at the nginx configs itself...

PESolut commented 1 month ago

contents of nginx config( /etc/nginx/nginx.conf )

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 1024;
}

http {
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    keepalive_timeout   65;
    types_hash_max_size 4096;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;
# Settings for a TLS enabled server.
#
#    server {
#        listen       443 ssl http2;
#        listen       [::]:443 ssl http2;
#        server_name  _;
#        root         /usr/share/nginx/html;
#
#        ssl_certificate "/etc/pki/nginx/server.crt";
#        ssl_certificate_key "/etc/pki/nginx/private/server.key";
#        ssl_session_cache shared:SSL:1m;
#        ssl_session_timeout  10m;
#        ssl_ciphers PROFILE=SYSTEM;
#        ssl_prefer_server_ciphers on;
#
#
#        # Load configuration files for the default server block.
#        include /etc/nginx/default.d/*.conf;
#
#        error_page 404 /404.html;
#        location = /404.html {
#        }
#
#        error_page 500 502 503 504 /50x.html;
#        location = /50x.html {
#        }
#    }

}
PESolut commented 1 month ago

contents of modular config file ( /etc/nginx/conf.d/jp-tech.conf )

   server {
       listen 80;
       server_name jp-tech.dev www.jp-tech.dev;

       location / {
           proxy_pass http://localhost:3000;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection 'upgrade';
           proxy_set_header Host $host;
           proxy_cache_bypass $http_upgrade;
       }
   }
PESolut commented 1 month ago

my init. thought is to confirm that the jp-tech modular config file is being loaded properly... lets try to add the server block within the nginx.conf

running sudo nano nginx.conf at directory /etc/nginx

edited file below the include block and included the server block from my modular config file

testing the nginx configuration with nginx -t to ensure there are no syntax errors.

That change breaks the nginx config; must use the modular config file to which exists...

PESolut commented 4 weeks ago

Check NGINX Logs

Attempting to look at log fiels and i have ownership issues it seems.. running these commands to switch

Change ownership of the Nginx log directory

sudo chown -R nginx:nginx /var/log/nginx

Set appropriate permissions

sudo chmod -R 755 /var/log/nginx

Restart Nginx to ensure it picks up any changes

sudo systemctl restart nginx

Check the Nginx status again

sudo systemctl status nginx

Now try to list the contents of the log directory

sudo ls -l /var/log/nginx

OUTPUT

[ec2-user@ip-172-31-27-183 nginx]$ sudo systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: di>
     Active: active (running) since Wed 2024-10-16 14:51:25 UTC; 25s ago
    Process: 179779 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, st>
    Process: 179791 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCC>
    Process: 179796 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
   Main PID: 179814 (nginx)
      Tasks: 2 (limit: 1112)
     Memory: 2.2M
        CPU: 31ms
     CGroup: /system.slice/nginx.service
             ├─179814 "nginx: master process /usr/sbin/nginx"
             └─179815 "nginx: worker process"

Oct 16 14:51:25 ip-172-31-27-183.us-east-2.compute.internal systemd[1]: Startin>
Oct 16 14:51:25 ip-172-31-27-183.us-east-2.compute.internal nginx[179791]: ngin>
Oct 16 14:51:25 ip-172-31-27-183.us-east-2.compute.internal nginx[179791]: ngin>
Oct 16 14:51:25 ip-172-31-27-183.us-east-2.compute.internal systemd[1]: Started>
lines 1-18/18 (END)
[ec2-user@ip-172-31-27-183 nginx]$ sudo ls -l /var/log/nginx
total 264
-rwxr-xr-x. 1 nginx nginx  87550 Oct 16 14:38 access.log
-rwxr-xr-x. 1 nginx nginx  22524 Oct 14 23:57 access.log-20241015.gz
-rwxr-xr-x. 1 nginx nginx 113620 Oct 16 00:00 access.log-20241016
-rwxr-xr-x. 1 nginx nginx  11399 Oct 16 14:51 error.log
-rwxr-xr-x. 1 nginx nginx   4593 Oct 15 00:00 error.log-20241015.gz
-rwxr-xr-x. 1 nginx nginx  16510 Oct 16 00:00 error.log-20241016
[ec2-user@ip-172-31-27-183 nginx]$

It looks like the Nginx service is running correctly, and the permissions for the log files have been set appropriately. Now, let's continue with the troubleshooting process:

check server block config

grep -A 10 "server_name jp-tech.dev"

check if application is running on port 3000

TRUE

error log

[ec2-user@ip-172-31-27-183 nginx]$ sudo tail -n 50 /var/log/nginx/error.log
2024/10/16 03:03:46 [warn] 83537#83537: *1509 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/4/05/0000000054 while reading upstream, client: 104.197.69.115, server: jp-tech.dev, request: "GET /assets/img/hero-bg.png HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/img/hero-bg.png", host: "jp-tech.dev", referrer: "http://jp-tech.dev/"
2024/10/16 03:03:46 [warn] 83537#83537: *1506 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/5/05/0000000055 while reading upstream, client: 34.72.176.129, server: jp-tech.dev, request: "GET /assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6 HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6", host: "jp-tech.dev", referrer: "http://jp-tech.dev/assets/vendor/bootstrap-icons/bootstrap-icons.css"
2024/10/16 03:32:59 [warn] 83537#83537: *1545 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/6/05/0000000056 while reading upstream, client: 66.249.66.70, server: jp-tech.dev, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "www.jp-tech.dev", referrer: "http://www.jp-tech.dev/"
2024/10/16 03:32:59 [warn] 83537#83537: *1542 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/7/05/0000000057 while reading upstream, client: 66.249.66.72, server: jp-tech.dev, request: "GET /assets/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap/css/bootstrap.min.css", host: "www.jp-tech.dev", referrer: "http://www.jp-tech.dev/"
2024/10/16 04:23:30 [warn] 83537#83537: *1575 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/8/05/0000000058 while reading upstream, client: 35.187.132.203, server: jp-tech.dev, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "jp-tech.dev", referrer: "http://jp-tech.dev"
2024/10/16 04:24:29 [warn] 83537#83537: *1592 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/9/05/0000000059 while reading upstream, client: 66.249.66.80, server: 3.23.19.43, request: "GET /assets/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap/css/bootstrap.min.css", host: "www.lawyeredup.co.za", referrer: "http://www.lawyeredup.co.za/"
2024/10/16 04:24:32 [warn] 83537#83537: *1588 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/0/06/0000000060 while reading upstream, client: 66.249.66.81, server: 3.23.19.43, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "www.lawyeredup.co.za", referrer: "http://www.lawyeredup.co.za/"
2024/10/16 04:31:27 [warn] 83537#83537: *1618 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/1/06/0000000061 while reading upstream, client: 81.95.5.39, server: jp-tech.dev, request: "GET /assets/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap/css/bootstrap.min.css", host: "jp-tech.dev", referrer: "http://jp-tech.dev/"
2024/10/16 04:31:28 [warn] 83537#83537: *1622 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/2/06/0000000062 while reading upstream, client: 81.95.5.39, server: jp-tech.dev, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "jp-tech.dev", referrer: "http://jp-tech.dev/"
2024/10/16 04:31:29 [warn] 83537#83537: *1622 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/3/06/0000000063 while reading upstream, client: 81.95.5.39, server: jp-tech.dev, request: "GET /assets/img/hero-bg.png HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/img/hero-bg.png", host: "jp-tech.dev", referrer: "http://jp-tech.dev/"
2024/10/16 04:31:30 [warn] 83537#83537: *1620 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/4/06/0000000064 while reading upstream, client: 81.95.5.39, server: jp-tech.dev, request: "GET /assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6 HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6", host: "jp-tech.dev", referrer: "http://jp-tech.dev/assets/vendor/bootstrap-icons/bootstrap-icons.css"
2024/10/16 05:01:19 [warn] 83537#83537: *1667 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/5/06/0000000065 while reading upstream, client: 34.220.2.175, server: 3.23.19.43, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "3.23.19.43"
2024/10/16 05:24:34 [warn] 83537#83537: *1682 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/6/06/0000000066 while reading upstream, client: 34.122.147.229, server: jp-tech.dev, request: "GET /assets/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap/css/bootstrap.min.css", host: "jp-tech.dev", referrer: "http://jp-tech.dev/"
2024/10/16 05:24:34 [warn] 83537#83537: *1689 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/7/06/0000000067 while reading upstream, client: 104.197.69.115, server: jp-tech.dev, request: "GET /assets/img/hero-bg.png HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/img/hero-bg.png", host: "jp-tech.dev", referrer: "http://jp-tech.dev/"
2024/10/16 05:24:34 [warn] 83537#83537: *1679 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/8/06/0000000068 while reading upstream, client: 34.122.147.229, server: jp-tech.dev, request: "GET /assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6 HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6", host: "jp-tech.dev", referrer: "http://jp-tech.dev/assets/vendor/bootstrap-icons/bootstrap-icons.css"
2024/10/16 11:37:46 [warn] 83537#83537: *1859 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/9/06/0000000069 while reading upstream, client: 44.234.252.20, server: 3.23.19.43, request: "GET /assets/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap/css/bootstrap.min.css", host: "3.23.19.43"
2024/10/16 11:37:46 [warn] 83537#83537: *1877 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/0/07/0000000070 while reading upstream, client: 44.234.252.20, server: 3.23.19.43, request: "GET /assets/vendor/bootstrap-icons/bootstrap-icons.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap-icons/bootstrap-icons.css", host: "3.23.19.43"
2024/10/16 11:37:46 [warn] 83537#83537: *1879 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/1/07/0000000071 while reading upstream, client: 44.234.252.20, server: 3.23.19.43, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "3.23.19.43"
2024/10/16 14:14:52 [warn] 83537#83537: *1999 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/2/07/0000000072 while reading upstream, client: 69.164.130.248, server: 3.23.19.43, request: "GET /assets/vendor/bootstrap/css/bootstrap.min.css HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/vendor/bootstrap/css/bootstrap.min.css", host: "3.23.19.43", referrer: "http://3.23.19.43/"
2024/10/16 14:14:52 [warn] 83537#83537: *1998 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/3/07/0000000073 while reading upstream, client: 69.164.130.248, server: 3.23.19.43, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "3.23.19.43", referrer: "http://3.23.19.43/"
2024/10/16 14:14:53 [warn] 83537#83537: *1998 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/4/07/0000000074 while reading upstream, client: 69.164.130.248, server: 3.23.19.43, request: "GET /assets/img/hero-bg.png HTTP/1.1", upstream: "http://127.0.0.1:3000/assets/img/hero-bg.png", host: "3.23.19.43", referrer: "http://3.23.19.43/"
2024/10/16 14:45:55 [emerg] 179528#179528: "server" directive is not allowed here in /etc/nginx/nginx.conf:13
2024/10/16 14:45:57 [emerg] 179532#179532: "server" directive is not allowed here in /etc/nginx/nginx.conf:13
2024/10/16 14:49:34 [notice] 83536#83536: signal 3 (SIGQUIT) received from 1, shutting down
2024/10/16 14:49:34 [notice] 83537#83537: gracefully shutting down
2024/10/16 14:49:34 [notice] 83537#83537: exiting
2024/10/16 14:49:34 [notice] 83537#83537: exit
2024/10/16 14:49:34 [notice] 83536#83536: signal 17 (SIGCHLD) received from 83537
2024/10/16 14:49:34 [notice] 83536#83536: worker process 83537 exited with code 0
2024/10/16 14:49:34 [notice] 83536#83536: exit
2024/10/16 14:49:34 [notice] 179674#179674: using the "epoll" event method
2024/10/16 14:49:34 [notice] 179674#179674: nginx/1.24.0
2024/10/16 14:49:34 [notice] 179674#179674: OS: Linux 6.1.109-118.189.amzn2023.x86_64
2024/10/16 14:49:34 [notice] 179674#179674: getrlimit(RLIMIT_NOFILE): 65535:65535
2024/10/16 14:49:34 [notice] 179675#179675: start worker processes
2024/10/16 14:49:34 [notice] 179675#179675: start worker process 179676
2024/10/16 14:51:25 [notice] 179675#179675: signal 3 (SIGQUIT) received from 1, shutting down
2024/10/16 14:51:25 [notice] 179676#179676: gracefully shutting down
2024/10/16 14:51:25 [notice] 179676#179676: exiting
2024/10/16 14:51:25 [notice] 179676#179676: exit
2024/10/16 14:51:25 [notice] 179675#179675: signal 17 (SIGCHLD) received from 179676
2024/10/16 14:51:25 [notice] 179675#179675: worker process 179676 exited with code 0
2024/10/16 14:51:25 [notice] 179675#179675: exit
2024/10/16 14:51:25 [notice] 179796#179796: using the "epoll" event method
2024/10/16 14:51:25 [notice] 179796#179796: nginx/1.24.0
2024/10/16 14:51:25 [notice] 179796#179796: OS: Linux 6.1.109-118.189.amzn2023.x86_64
2024/10/16 14:51:25 [notice] 179796#179796: getrlimit(RLIMIT_NOFILE): 65535:65535
2024/10/16 14:51:25 [notice] 179814#179814: start worker processes
2024/10/16 14:51:25 [notice] 179814#179814: start worker process 179815
2024/10/16 15:03:09 [warn] 179815#179815: *3 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/proxy/1/00/0000000001 while reading upstream, client: 170.106.197.109, server: jp-tech.dev, request: "GET /static/js/main.debbd671.js HTTP/1.1", upstream: "http://127.0.0.1:3000/static/js/main.debbd671.js", host: "www.jp-tech.dev"
[ec2-user@ip-172-31-27-183 nginx]$

access log

[ec2-user@ip-172-31-27-183 nginx]$ sudo tail -n 20 /var/log/nginx/access.log
69.164.130.248 - - [16/Oct/2024:14:14:53 +0000] "GET /assets/img/reacticon.svg HTTP/1.1" 200 3558 "http://3.23.19.43/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
69.164.130.248 - - [16/Oct/2024:14:14:53 +0000] "GET /assets/img/headshot1JPF.jpg HTTP/1.1" 200 69526 "http://3.23.19.43/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
69.164.130.248 - - [16/Oct/2024:14:14:53 +0000] "GET /assets/img/node-js.svg HTTP/1.1" 200 3269 "http://3.23.19.43/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
69.164.130.248 - - [16/Oct/2024:14:14:53 +0000] "GET /assets/img/pythonicon.svg HTTP/1.1" 200 919 "http://3.23.19.43/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
69.164.130.248 - - [16/Oct/2024:14:14:53 +0000] "GET /assets/img/hero-bg.png HTTP/1.1" 200 1347924 "http://3.23.19.43/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
69.164.130.248 - - [16/Oct/2024:14:14:53 +0000] "GET /assets/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6 HTTP/1.1" 200 130396 "http://3.23.19.43/assets/vendor/bootstrap-icons/bootstrap-icons.css" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
69.164.130.248 - - [16/Oct/2024:14:14:54 +0000] "GET /assets/img/favicon.png HTTP/1.1" 200 1156 "http://3.23.19.43/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" "-"
66.249.79.235 - - [16/Oct/2024:14:38:13 +0000] "GET /robots.txt HTTP/1.1" 200 67 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" "-"
66.249.79.233 - - [16/Oct/2024:14:38:13 +0000] "GET /wp-content/uploads/2021/09/christina-wocintechchat-com-vpa6e3Hqy9U-unsplash-1024x683.jpg HTTP/1.1" 404 153 "-" "Googlebot-Image/1.0" "-"
43.131.249.153 - - [16/Oct/2024:15:01:14 +0000] "GET / HTTP/1.1" 200 1824 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1" "-"
170.106.197.109 - - [16/Oct/2024:15:03:09 +0000] "GET /static/js/main.debbd671.js HTTP/1.1" 200 217762 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1" "-"
135.125.246.189 - - [16/Oct/2024:15:10:49 +0000] "GET /.env HTTP/1.1" 404 555 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36" "-"
135.125.246.189 - - [16/Oct/2024:15:10:50 +0000] "POST / HTTP/1.1" 405 559 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36" "-"
148.153.56.82 - - [16/Oct/2024:15:13:29 +0000] "GET /Gdy8 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" "-"
148.153.56.82 - - [16/Oct/2024:15:13:29 +0000] "GET /CZGy HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" "-"
148.153.56.82 - - [16/Oct/2024:15:13:29 +0000] "GET /aab8 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" "-"
148.153.56.82 - - [16/Oct/2024:15:13:29 +0000] "GET /jquery-3.3.1.slim.min.js HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" "-"
148.153.56.82 - - [16/Oct/2024:15:13:30 +0000] "GET /aab9 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" "-"
148.153.56.82 - - [16/Oct/2024:15:13:30 +0000] "GET /jquery-3.3.2.slim.min.js HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0" "-"
43.159.129.209 - - [16/Oct/2024:15:20:26 +0000] "GET / HTTP/1.1" 200 1824 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1" "-"
[ec2-user@ip-172-31-27-183 nginx]$
PESolut commented 4 weeks ago

I can curl within the instance the localhost at port 3000 and also with no port supplied so port 80 so nginx is correctly proxying request to my application runing on port 3000

PESolut commented 4 weeks ago

after running curl http://jp-tech.dev on my local machine i learned that theres no nginx config issues. it seems that it might just be the lack of a SSL certificate...