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:


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.

John-Paul Briones Content Writer II

John-Paul is an Electronics Engineer that spent most of his career in IT. He has been a Technical Writer for InMotion since 2013.

More Articles by John-Paul

Was this article helpful? Join the conversation!