Wampserver the WWW directory change to the specified directory

Source: Internet
Author: User
Tags php file

Main process:
(1) Modify httpd.conf file
(2) Modify the index.php file under the new WWW directory
(3) Modify Manage.ini 278 lines and MANAGE.TPL 125 lines

My WAMP2.0 is installed on e disk, so my www directory is e:/wamp/www/and I want to change it to g:/www/
The first step: just as others say, modify the httpd.conf file
DocumentRoot the "e:/wamp/www/" line to DocumentRoot "g:/www/"
This line is changed to
Save, restart Wamp, but did not reach the results we want, http://localhost/is changed, but I want the normal installation after the first page is displayed version information, then the original e:/wamp/www/index.php files copied to the g:/www/, There are errors displayed.
Step Two: Open the index.php file under g:/www/and see line 11th to 15th:
Chemin jusqu ' au fichier de conf de wampserver
$wampConfFile = '. /wampmanager.conf ';
Chemin jusqu ' aux fichiers alias
$aliasDir = '. /alias/';
To correct the configuration file and the path of the virtual directory is to change the original relative path to absolute path:
Chemin jusqu ' au fichier de conf de wampserver
$wampConfFile = ' e:/wamp/wampmanager.conf ';
Chemin jusqu ' aux fichiers alias
$aliasDir = ' e:/wamp/alias/';
This can be normal, restart Wamp open http://localhost/see the same as you normally see. If you do not need this homepage, want to do a home page, or just put a website to play, this step can not.
But the effect is still not perfect, http://localhost/problem is solved, but point to the bottom right corner of the icon, the menu has a "www directory", after the point of the Open is still e:/wamp/www/, want to change to g:/www down look
Step Three: Change the menu "www directory" to point to
MANAGE.TPL, what should be the template file, open it, as expected, is 119 lines is [Menu.left], and then look down, 125 lines are like this:
Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "${wwwdir}"; Glyph:2

${w_wwwdirectory} This is the WWW directory, then the FileName after the variable should be pointed to the directory, and then, FileName: After the contents of the quotes changed to g:/www/, the final result is:
Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "g:/www/"; Glyph:2

Open the Manage.ini and find it in line 278.
Type:item; Caption: "www directory"; Action:shellexecute; FileName: "e:/wamp/www/"; Glyph:2

Change the e:/wamp/www/to g:/www/, it should be, save, restart Wamp.

Description: Wamp Restart may sometimes be ineffective, I have encountered this situation, do not know how the case, this situation can be the first Wamp all exit, and then start on it.

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.