
NOTE: Don't forget to restart the NGINX server after doing this Try_files $uri $uri/ /index.php?q= $uri& $args If your using LARAVEL project with NGINX configuration file then make sure to include the following file inside /etc/nginx/sites-available/stackcoder.in make sure to check your configuration file name and make the following changes
#NGINX 404 NOT FOUND CODE#
And here you look for the following code blockįastcgi_pass unix:/var/run/php/ Ĭheck if this path exists unix:/var/run/php/ Go to your website configuration file inside /etc/nginx/sites-available/stackcoder.in, here mine is stackcoder.in your's might be different. Make sure to change it to your configuration file name.ģ) If Using PHP, Then Check If PHP Socket Exists Sudo ln -s /etc/nginx/sites-available/stackcoder.in /etc/nginx/sites-enabled/

To activate the configuration file use the following code

Mine is stackcoder.in which wont be activated inside sites-enabled. You might have your website configuration file in sites-available For Eg.
#NGINX 404 NOT FOUND HOW TO#
I have written a detailed article on how to install and manage your NGINX server in Linux don't forget to check it out How To Install NGINX In Linux / Ubuntu Package Manager & Manage It.Ģ) Created New Configuration File But Not ActivatedĪll your configuration files resides in /etc/nginx/sites-available & once you activate them they will be in /etc/nginx/sites-enabled which are eventually the symbolic link to sites-available.īy default the default configuration file will be enabled first go to sites-enabled folder and remove the soft link of default. If everything is correct then run the reload command Most of the times developer change the configuration file and forget to restart the NGINX serverįirst TEST if the NGINX configuration is correct or not with the following command If not then in Ubuntu or any Debain version you can install with the following In thing article I will walk you through how to get it resolved.

There are many times when you have installed NGINX but sometimes you will come across the weird thing ie 404 not found.
