Installation and configuration of WampServer

Author: Wang Jiaojiao

When: September 19, 2017

How to debug php files? It is necessary to use an external server. Today I will introduce a tool I use: WampServer .

WampServer is a French-developed Apache web server, PHP interpreter and MySQL database integration software package (a term from the Internet, hahaha).

The following will teach you how to install and configure (I use windows).

1. Installation and startup

(1) Download address

http://www.wampserver.com/en/#download-wrapper

Choose 64-bit or 32-bit according to your computer needs.

(2) Installation directory and icon

When installing, you must choose the directory yourself , because later I need to find this directory to modify things. The installed directory is called wamp64.

After the installation is complete, the following small icon will appear on the desktop:

(3) Start

Double-click to open the small icon, and you will see the following small icon on the taskbar in the lower right corner. If it is green, it means the startup is successful (it will go through a process from orange, to red, and then to green):

2. Configuration

This part of the content is very critical, configure WampServer.

First create a directory locally. This directory is where the php files will be placed in the future. For example, if I create a jojo directory, the path is: C:/Users/PC-WJJ/jojo

(1) Modify the documentroot in the httpd.conf file under apache .

Left click on the small icon --> Apache --> http.conf

Open http.conf, find documentroot , and modify the directory I circled in red.

(2) Modify the directory in the httpd.vhosts.conf file under apache .

Left click on the small icon --> Apache --> httpd.vhosts.conf

Open httpd.vhosts.conf, look for directory , and modify the directory I circled in red.

I have forgotten what the initial state looks like. If you are not clear, you can copy the code below and modify the path.

<VirtualHost *:80>
	ServerName jojo
	DocumentRoot C:/Users/PC-WJJ/jojo
	<Directory  "C:/Users/PC-WJJ/jojo/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
		Require local
	</Directory>
</VirtualHost>

(3) Modify the www dirctory path in the wampmanager.ini and wampmanager.tpl files in the wamp64 (installation steps) directory .

 

(4) Add the following code at the end of the hosts file (my hosts file path is this: C:\Windows\System32\drivers\etc\hosts):

127.0.0.1 jojo.com

 

3. Restart all services

4. Access address: http://jojo.com/

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326078193&siteId=291194637