[Ubantu] [apache2] before modifying the default access path, when apache is used for development, the directory var/www/PB of a blog created under var/www is used. Therefore, during development, all resource links are based on the Environment path. Because sinaapp has been applied. Therefore, we hope to change the working directory during local development and debugging to the root directory form. There are many methods on the Internet. Now we use an online method: http://www.bkjia.com/ OS /201308/238996.html 1. Modify the default website directory ubuntu8.10 modify the default document directory of apache2 is in/var/www by default sudo gedit/etc/apache2/sites-enabled/000-default in the document find DocumentRoot and modify the directory of the webpage file to be placed. After modification, do not forget to restart the apache2 server. Command: sudo/etc/init. d/apache2 restart 2. Modify the default homepage to modify the default homepage. Generally, find the DirectoryIndex in sudo gedit/etc/apache2/apache2.conf and add it as index. php and other files are stored in different locations with apache2 versions. I have different configuration files under ubuntu8.10. Do not enter this command grep-iR DirectoryIndex/etc/apache2 to check that DirectoryIndex is in the file apache2. This is my/etc/apache2/mod-enabled/dir. conf: DirectoryIndex index.html index. cgi index. pl index. php index.xhtml index.htm/etc/apache2/mod-available/dir. conf: DirectoryIndex index.html index. cgi index. pl index. why does php index.xhtml index.htm exist in all two files. I don't know, but some experts in the group said that the two file links are the symbolic links below, or the same. Simply add the default document.