1. Environmental and demand
win10_x64, php7, apache24, thinkphp5. Now, I use apache to set up a project THINKPHP of a virtual host, you need to configure.
2. Step
a. First, find httpd.conf (default is conf file in the apache directory folder). Find #Include conf / extra / httpd-vhosts.conf row, remove the #. To configure the back of the virtual configuration file.
. B Second, enter the directory extra, find httpd-vhosts.conf, at the beginning of the file add the following code:
Listen 83 # assigned to the project of the port number is 83
c. Then, the end of the file, add the following code
<VirtualHost *:83> DocumentRoot "O:/websites/youbangbao/public_html" <Directory "O:/websites/youbangbao/public_html"> Options FollowSymLinks ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
d. Finally, restart apache server, you can normally use.