Manage NGINX

In this tutorial, we will show you how to manage NGINX on your server. We will explain how the traffic flows, provide information on where relevant files and logs are located. Then, we will provide some NGINX troubleshooting steps and additional notes.

NGINX Traffic Flow

NGINX listens on port 80 and port 443 and relays requests back to Apache when it doesn’t have something cached. Apache builds your website and gives NGINX the HTML, etc. Then, NGINX gives it back to you and keeps a copy in cache in case someone else asks for it.

NGINX File/Log Locations

Your NGINX access logs and error logs are located here:

/var/log/nginx/

Troubleshooting NGINX

  • Make sure you have changed the listening ports.
  • It’s important to make sure that domains that are added in Apache/cPanel are also added in nginx’s configuration, which should happen by default if you’re using all of our packages
  • It can be useful to disable NGINX caching to see if any website errors are being cached or if there’s something going on with the cache.

Additional Notes

It is important to know that restarting NGINX does not clear the NGINX cache. NGINX stores its cache in memory, but it also uses files to store the cache and the files have to be deleted. If you have a WordPress stack, you can use the Cache Manager in cPanel to clear the NGINX cache.

IC
InMotion Hosting Contributor Content Writer II

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+