PHP-ThinkPHP mounting frame

Two, ThinkPHP frame mounting

1. Download and unzip the frame

Download: http://www.thinkphp.cn

Here Insert Picture Description

After downloading unzip to a working directory

Here Insert Picture Description

2, the virtual host configuration

① configured through phpStudy the "site domain management" or directly modify the apache virtual host configuration file,

Here Insert Picture Description

The site domain names point to public directory under the project directory

Here Insert Picture Description

② DNS, modify the hosts file

Here Insert Picture Description

A domain name is as follows: multiple domain names can be written on the same line, separated by a space

127.0.0.1 tpshop.com www.tpshop.com

③ restart apache, browser access to the configuration of a virtual site http://www.tpshop.com

Here Insert Picture Description

See the above screen, indicating that the installation was successful framework.

apache configuration reference (not copy):

<VirtualHost *:80>
    DocumentRoot "E:\phpStudy\WWW\tpshop\public"
    ServerName www.tpshop.com
    ServerAlias tpshop.com
  	<Directory "E:\phpStudy\WWW\tpshop\public">
      	Options FollowSymLinks ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
  	</Directory>
</VirtualHost>
Released 1833 original articles · won praise 1956 · Views 170,000 +

Guess you like

Origin blog.csdn.net/weixin_42528266/article/details/105120663