Jerry203
By:
Jerry203

How do I get Nginx to pick changes in site config file.

March 29, 2017 589 views
Let's Encrypt

I made a type in my server name in nginx/site-available/default and so my http traffic is being transferred to the wrong https site. I corrected the type but I can't get Nginx to pick the change.
I am using Letsencrypt certificate, my stack is Ubuntu 16.04 Nginx, gunicorn, flask

2 Answers

@Jerry203

You'll need to restart or reload NGINX from the CLI each time you make configuration changes.

service nginx restart

or

systemctl restart nginx
  • Let try service nginx restart , the other one has not been effective.

    • Try a new incognito/private browser window. Sometimes Chrome/Firefox stores the information for some time.

Thanks that worked.

  • @Jerry203

    No problem :-).

    NGINX doesn't function dynamically like changes to an .htaccess file would with Apache, so much like changes to Apaches core configuration, NGINX has to be restarted with each change that gets made, whether it's one letter or 50+ lines.

Have another answer? Share your knowledge.