0x0
Mrxn reminder ,DIY Risk , Please back up the data ! Before you modify a file , Please copy a backup first , It's always good !
0x1
First, you need to know the root directory path of the website you want to set , I won't describe this , Don't know , Then there is no need to look down .
0X2
On the basis of the first step , How can we let the server find the root directory of the website we set ? Please follow me :
We know ,PHP The file is Apache Executed , Then we need to modify Apache Configuration file for httpd.conf As shown in the figure one As shown in :
open httpd.conf after ,Ctrl + F search : DocumentRoot Find the line with the drive letter to install the road reinforcement , For example, mine is : c:/wamp/www/ It mainly depends on your installation wamp_server Installation path when ,
; hold c:/wamp/www/ Change to the path where you place the website program , The blogger has changed to f:/web
Then you can see about a few lines down : <Directory "c:/wamp/www/" Also change Lujin to the path where you place the website program ,
Ctrl + S preservation , Then close , sign out . Here ,Apache Setting is complete . But the overall settings have not been completed , Please look down ;
0x3
Restart wamp_server ( After the configuration file is repaired, it is better to restart the server , In case of ineffectiveness ), method : click wamp_server Icon , choice < Restart all services >
After restart , Check whether the configuration is effective , method : Create a new one in the website program folder PHP file , Write <? php echo”success !”;?> And named test.php.
Open Browser , Enter in the address bar : http://localhost/test.php After Enter is opened , notice php Executed , Return to the effect shown in Figure 2 , Is successful :
0x4
After setting these , You can start to stack bricks ^_^ !
But I'm a bit of a perfectionist - _- !
As shown in Figure 3 ,www catalog It should be click to enter the directory we set , But now after clicking , Enter the directory that the system started to set !
ok , Let's begin to modify it !
get into wamp_server default directory : c:/wamp Find two files in the red box as shown in Figure 4 : wampmanager.ini & wampmanager.tpl
open wampmanager.ini Ctrl + F search menu.left Find Figure 5 (Please click to view the large picture) Shown with ”www catalog ” Content section of words
“www catalog ” See Figure 3 www catalog We can change it to the name of the website root directory set by ourselves , for example “Web catalog ”( Without quotation marks )
Put the back c:/wamp/www Modify it to the directory where we place website programs , For example, the blogger's : f:/Web After modification ,Ctrl + S preservation ,
Then open wampmanager.tpl Ctrl + F search menu.left Find the area shown in Figure 6 (please click to view the larger picture) :
take "${w_wwwDirectory}" Modify to "Web catalog " , "${wwwDir}" Modify to "f:/Web" Then restart it wamp_server The server ; You can see the effect , We click www Directory to enter the set website root directory . As shown in Figure 7 :
Please leave me a message if you don't understand , Blog message board : https://mrxn.net
Here is the word version: Click Download You can follow me !