REVIEW : xampp is a very good thing, learning in the process of learning and jquery ajax in front of the need to use local server, first thought to learn nodejs, put nodejs based learning again, even if later trapped in a learning foundation, also only run html, json and other documents, or can not link php file, you do not want to learn basic front-end nodejs completion? Baidu to no avail asked about the front-end big brother, told me xampp software, XAMPP (Apache + MySQL + PHP + PERL) station is a powerful integrated package. With it you can continue learning enjoyable friends ~
About Amway install xampp here a link (Photo) The most detailed XAMPP installation and use tutorial , this tutorial is not recommended step 6, that is, modify the default MySQL password
Next, enter the text
First, the configuration file changes
1. Modify the httpd.conf /xampp/apache/conf/httpd.conf
Find LoadModule vhost_alias_module modules / mod_vhost_alias.so this section in front of the # removed, there is no information on the Internet to find this description, resulting in the virtual directory configuration fails
Then change the following:
<Directory />
AllowOverride none
Require all denied
</Directory>
Read:
<Directory />
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Save Close
Finally, open httpd-xampp.conf
Add code <IfModule alias_module> </ IfModule> in general can be found in the end of the file, the line is added in the tag
#E盘codegame目录 Alias /codegame "E:/codeGame" <Directory E:/codeGame> Options Indexes FollowSymLinks order allow,deny Allow from all </Directory>
# Is a comment in front of the meaning of
The first line of code / codegame routing, that is, localhost: 8000 address / add back (I am here to set the port number is 8000.) ==> Enter localhost: 8000 / codegame to visit
"E: / codeGame" Needless to say, a file address, pay attention to the following address files have to be changed <Directory E: / codeGame>, change their address
so far, you can already localhost: port number / codegame E disk access web content.
However, our actual projects are accessed through the domain name. Here it is to set up the domain configuration.
II. Modify the domain configuration file
Open xampp directory
Find xampp / apache / conf / extra / httpd-vhosts.conf file
The following code, the address where the file itself modified
<VirtualHost *: 80> ## default directory DocumentRoot "E: / codeGame" ServerName codegame </ VirtualHost>
Third, modify the hosts file
Open the C drive C: \ Windows \ System32 \ drivers \ etc \ hosts file to add the above configuration file to add the file directory hosts file
127.0.0.1 localhost