Apache does not read subdirectories

Asked

Viewed 260 times

0

Hello,

I’m starting with Linux now and I’m trying to set up an Apache server for test purposes. I am using Debian 9 and have already installed Apache, PHP 7.0, libs and Mariadb.

Through the browser using the http://ip-do-server loads the index.html that is inside /var/www/html/ usually however if I create a new directory inside, for example, /var/www/html/test/ and put any file, I can’t access through the browser.

Any tips on how to solve it? Is there any permission missing? When creating the directory I already circled a chmod 777 on it.

Thanks in advance.


The following message appears in the browser:

This page is not working 192.168.0.101 is unable to comply with this request at this time. HTTP ERROR 500

In /var/log/apache2/error.log the following message appears:

[Wed Jan 10 09:21:42.054246 2018] [:error] [pid 480] [client 192.168.0.9:55441] PHP Fatal error: Unknown: Failed Opening required '/var/www/html/Gra/index.php' (include_path='.:/usr/share/php') in Unknown on line 0

  • Is there an error in the browser? If possible check the Apache logs on /var/log/apache2 and post the error in your question using the [Edit]

  • Applies a chmod -R 0755 /var/www/html and a chown -R www-data:www-data /var/www/html and test php code with <?php phpinfo(); ?>

  • Perfect Valdeir, it worked. It was permission even. Thank you very much!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.