Week Four — Nginx Web Server - matthewlaujh/itpnyu-understandingnetworks GitHub Wiki

Set up nginx as a web server on your network host. Configure it for both HTTP and HTTPS requests, and prepare a basic home page using HTML, CSS, and JavaScript. Link to it from your blog. Examine the HTTP access logs over the course of a week to see if there are any patterns to who visits your site.

Write a summary of your work and findings on your blog. We’ll compare notes in class.


No issues setting up the Nginx Web Server, but hit a snag when trying to generate a HTTPS Cert for it. I dug around for awhile and realised that it was because I didn't have AAAA set up for IPV6, so I tried turning that on, but the next problem was that my domain host didn't allow me to add AAAA records to it, so I'm kind of stuck on that now.

Requesting a certificate for itpnyu-understanding-networks.matthewlaujh.com and www.itpnyu-understanding-networks.matthewlaujh.com

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems: Domain: www.itpnyu-understanding-networks.matthewlaujh.com Type: dns Detail: DNS problem: NXDOMAIN looking up A for www.itpnyu-understanding-networks.matthewlaujh.com - check that a DNS record exists for this domain; DNS problem: NXDOMAIN looking up AAAA for www.itpnyu-understanding-networks.matthewlaujh.com - check that a DNS record exists for this domain

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Some challenges have failed. Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

I contacted the support over at cargo and got them to add the AAAA DNS records for me, I successfully managed to deploy the HTTPS cert this time everything works fine now!

Saving debug log to /var/log/letsencrypt/letsencrypt.log Requesting a certificate for itpnyu-understanding-networks.matthewlaujh.com and www.itpnyu-understanding-networks.matthewlaujh.com

Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/itpnyu-understanding-networks.matthewlaujh.com/fullchain.pem Key is saved at: /etc/letsencrypt/live/itpnyu-understanding-networks.matthewlaujh.com/privkey.pem This certificate expires on 2024-12-30. These files will be updated when the certificate renews. Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate Successfully deployed certificate for itpnyu-understanding-networks.matthewlaujh.com to /etc/nginx/sites-enabled/itpnyu-understanding-networks.matthewlaujh.com Successfully deployed certificate for www.itpnyu-understanding-networks.matthewlaujh.com to /etc/nginx/sites-enabled/itpnyu-understanding-networks.matthewlaujh.com Congratulations! You have successfully enabled HTTPS on https://itpnyu-understanding-networks.matthewlaujh.com and https://www.itpnyu-understanding-networks.matthewlaujh.com

https://itpnyu-understanding-networks.matthewlaujh.com/

Super weird thing is happening now, seems like the site and my main domain wwww.matthewlaujh.com which is my portfolio site, they're taking their turn to stop working, seems like they're rotating between which one stays alive and which one goes down, but sometimes they both stay alive and sometimes they're both down too. Have to do some deeper digging.