It appears your server is not set to recognize index.php as the default page for a directory. You’ll need to edit your localhost server configuration.
This appears in “/etc/httpd/conf.d/php.conf” on my Fedora system:
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
It may be similar under your OS.
@sterndata I observed that very few URL’s will appear on a page with content. Most appear a list of directories or a blank page. Example: I can access the dashboard just if I manually enter the URL "http://localhost/wp-admin/index.php". If I put just "http://localhost/wp-admin/" it will appear a list with the content of the folder “wp-admin”.
Does your answer solve this as well?
Thanks in advance.
- This reply was modified 9 hours, 55 minutes ago by Paulo Matheus.
Yes. You need to fix your server config.
@sterndata I was able to solve it just by putting the index.php in the list that will serve as directory indexes (as you said). In my Operating System (Slackware Linux) the path of the httpd configuration file is: /etc/httpd/httpd.conf
For people who have doubts, in the httpd.conf file the DirectoryIndex index.php line is inserted in the part identified by <IfModule dir_module> </IfModule> (which will probably already have the DirectoryIndex index.html line). So the end result should look like this:
<IfModule dir_module>
DirectoryIndex index.html
DirectoryIndex index.php
</IfModule>I appreciate your help, Steven. Strong hug.
