The development of PHP projects are known, most will use the Wampserver, next small series for everyone to share the next Wampserver change the default Site Directory method.
The following three files are required to be modified:
Apache2 configuration Files httpd.conf and Wampserver profiles Wampmanager.ini and WAMPMANAGER.TPL
Where httpd.conf can find the installation directory: The next bin\apache\apache2.x.xx\conf\httpd.conf or directly in the WAMP software click
After opening the configuration file, change the two changes to the specified directory.
The directory in this configuration file has changed, but that's not going to work. Because Wampserver is an integrated installation, there are also configuration files to be modified in the Wampserver profile
Found in the directory under the Wampserver installation
Wampmanager.ini
Wampmanager.tpl
Open to find
In Wampmanager.ini:
Type:item; Caption: "www directory"; Action:shellexecute; FileName: "F:\www"; GLYPH:2WAMPMANAGER.TPL: Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "F:\www"; Glyph:2
Where F:\www is my directory I specified you can make your own changes to your own on it
And then reboot the Wampserver and it's OK.
In the end, if you use the original index.php, you'll get an error.
The reason is that the referenced wampserver profile file in PHP is a relative path
So if you're going to use the original, then change it to your absolute path or not.
Here is an example to give you a text to explain
Assume the following:
Wamp Version: 2.1
WAMP2.0 installation directory: c:/
www directory: c:/wamp/www/
Change Directory: e:/phproot/
A major process:
(1) Modify the C:\wamp\bin\apache\Apache2.2.17\conf \httpd.conf (Implementation changes the default Web site path, the Http://localhost will be directed to its own default directory: e:/phproot/)
(2) Copy and modify the index.php (make the index.php in the new Default Web site path appear correctly if you do not need index.php to skip this step)
(3) Modify C:\wamp\wampmanager.ini and C:\wamp\wampmanager.tpl (Change menu "www directory" point)
two specific modification method whole process:
First step: Modify C:\wamp\bin\apache\Apache2.2.17\conf \httpd.conf
Find: DocumentRoot "c:/wamp/www/"
Modified: DocumentRoot "e:/phproot/"
Find: <directory "c:/wamp/www/" >
Modified: <directory "e:/phproot/" >
Step Two: Copy and modify index.php
(1) Copy:
Copy the c:/wamp/www/to E:/phproot
(2) Find:
Chemin jusqu ' au fichier de conf de wampserver
$wampConfFile = '. /wampmanager.conf ';
Chemin jusqu ' aux fichiers alias
$aliasDir = '. /alias/';
(3) Modification:
Chemin jusqu ' au fichier de conf de wampserver
$wampConfFile = ' c:/wamp/wampmanager.conf ';
Chemin jusqu ' aux fichiers alias
$aliasDir = ' c:/wamp/alias/';
Step Three: Modify Wampmanager.ini and Wampmanager.tpl
1 Modification C:\wamp\wampmanager.ini:
(1) Open: C:\wamp\wampmanager.ini
(2) Find: Type:item; Caption: "www directory"; Action:shellexecute; FileName: "c:/wamp/www/"; Glyph:2
(3) Modification: Type:item; Caption: "www directory"; Action:shellexecute; FileName: "e:/phproot/"; Glyph:2
2 modification C:\WAMP\WAMPMANAGER.TPL:
(1) Open: C:\WAMP\WAMPMANAGER.TPL
(2) Find: Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "${wwwdir}"; Glyph:2
(3) Modification: Type:item; Caption: "${w_wwwdirectory}"; Action:shellexecute; FileName: "E:/phproot"; Glyph:2
Complete all steps to save the file so that the modification succeeds.
Above through the picture introduction and text description of the way summed up Wampserver change the default Site directory method, I hope you like.