Modify Wampserver default folder for Web pages

Source: Internet
Author: User

Left-click and click www Directory to open the Wampserver folder (for example, C:\wamp\www) that hosts the Web page by default.

The actual work, the folder that holds the webpage may not be under the WWW directory, or the Wampserver installation of the disk character space is too small, for the future extensibility of the site to consider, want to change the actual path of the site and so on, need to modify the Wampserver default folder for the Web page. The modification steps are divided into the following sections:

1. Open the Wampserver installation directory, and then open the "script" folder inside, with notepad++ open the config.inc.php file inside, search "Wwwdir", about 61 lines found "$wwwDir = $c _installdir .‘ /www '; ", change to the directory we want to, such as change to D:\webdirectory, the corresponding code is:

1 $wwwDir = $c _installdir. ' D/webdirectory ';

2. Open the Wampserver installation directory, locate the folder (installed locally on the C Drive) C:\wamp\bin\apache\apache2.4.9\conf, open the httpd.conf file with notepad++, search for "DocumentRoot ", about 230 lines, modified to:

1 DocumentRoot "d:/webdirectory/"

Then search for "Directory", about 252 lines, modified to:

1 <directory "d:/webdirectory/" >

3. Restart all service restart all services until the icon color turns green to normal. Otherwise, first check to see if the modified directory already exists, and then check that the two steps above are correct.

4. Check the results of the changes. Then click on "www directory", you can see the folder should be opened for the directory just modified. In addition, in the browser URL bar input: http://localhost/phpcms/index.php View page Default template homepage is normal.

Modify Wampserver default folder for Web pages

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.