Question

PHP Sub Files Not Showing up!

Hey!

So this post is mostly releated To my other post which was answered by 2 friends.

Now I have problems my the php files in the subcategory like dashboard.php not showing up.

I really need help as my main file index.php is working except the other files like dashboard.php, login.php, etc not showing up.

You can refer to my old post:- https://www.digitalocean.com/community/questions/nginx-not-showing-php-files?answer=36315

Thanks/ Kind regards, /shar

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

@sharletsings123

Looking a the snippet you’ve provided, it should work, so if you’re still seeing an error, then the issue may be elsewhere. Would you be able to post the complete contents of the file in a code block?

You can use the </> icon and place the code between the backticks.

@sharletsings123

Are you seeing any errors, such as a 404? Please run:

tail -20 /var/log/nginx/error.log

We can take a look at the error log and see if there’s anything useful that we can gather.

Beyond the error log, you need to make sure all files and directories are owned by the user + group that the PHP-FPM process is running as. Generally that’s www-data unless you’ve changed the pool file.