[Ubantu] [apache2] modify the default access path

Source: Internet
Author: User

[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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.