How to change the default directory and index file for Apache (installed via XAMPP)

How can I change the default directory and index file for Apache (installed via XAMPP), so instead of searching for htdocs and index it searches for myPath and myFile , respectively?

+4
source share
2 answers

The research link you entered has the first part of the answer to your question, changing the path you want to serve, but the second part of your question, making it serve as "myFile", since the index is an additional step. Cm:

http://httpd.apache.org/docs/2.0/mod/mod_dir.html#directoryindex

Thus, you would add this line inside the corresponding tags or even lose in the main httpd.conf file (see the "Context" section of the specified link for valid places for using this directive):

 DirectoryIndex myFile.ext 

Hope this helps.

+11
source

Edit the httpd.conf file - the DocumentRoot directory may be updated depending on which directory you need (and the process has permissions). Cm:

http://httpd.apache.org/docs/2.0/mod/core.html#documentroot

 DocumentRoot /usr/web 
+1
source

All Articles