The default root directory can be checked in httpd.conf
On my Slackware server it's:
Code:
...
<Directory "/srv/httpd/htdocs">
...
To enable .php pages, you need to uncomment the following line in httpd.conf:
Code:
Include /etc/httpd/mod_php.conf
Also, the code below specifies the order of reading files (first the server will check for .php files. If they are not present, .html files will be looked for.
Code:
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
You can have your root directory elsewhere - for example in your home directory. To do this you need to uncomment the line below (and edit the httpd-userdir.conf file accordingly):
Code:
# Include /etc/httpd/extra/httpd-userdir.conf
Bear in mind that the last option might not be enabled by default. For example, on Slackware in the stock apache package the 'userdir' option is not enabled.