Skip to content

Instantly share code, notes, and snippets.

@raviagheda
Last active January 12, 2025 16:38
Show Gist options
  • Save raviagheda/9f41706556023f544fd79a814cf1f098 to your computer and use it in GitHub Desktop.
Save raviagheda/9f41706556023f544fd79a814cf1f098 to your computer and use it in GitHub Desktop.
Nginx configuration setup
@new-php
Copy link

new-php commented Jan 8, 2025

I followed your guide to set up Nginx with SSL on my Ubuntu server, but I ran into a couple of issues. Initially, the Nginx configuration test failed due to a syntax error in nginx.conf. I realized I hadn't replaced <IP_ADDRESS> and in the proxy_pass directive properly. After fixing that, the sudo nginx -t command worked perfectly.

Another problem was with the SSL certificate issuance using Certbot. I received an error related to my domain verification. It turns out my DNS records were not correctly pointing to my server's IP. Once I updated the A records, Certbot successfully generated the certificates.

Also, for the automatic renewal, adding the certbot renew command to the crontab worked as expected. However, I'd recommend running a dry-run first (sudo certbot renew --dry-run) to ensure the setup is error-free.

The provided resource for testing the SSL certificate (GeoCerts SSL Checker) was extremely helpful in verifying the installation.

For anyone else facing similar challenges, this detailed guide on How to Install Nginx on Ubuntu could be a great starting point.

Thanks for including useful links like Let's Encrypt on Nginx. They really helped clarify a lot of the steps, especially for SSL setup!

Would appreciate more troubleshooting tips for common issues during Certbot and Nginx setup. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment