1.编辑hosts文件
vim /etc/hosts
2.设置(*为网址):
127.0.0.1 ***.com
120.78.202.104 ***.com
3.确保 下面两项开启
Include conf.modules.d/*.conf
IncludeOptional conf.d/*.conf
4.在 conf.d 里面新建vhost.conf 文件
vim /etc/httpd/conf.d/vhost.conf
5.新增虚拟主机设置
<VirtualHost *:80>
ServerName ****.com
DocumentRoot "/var/www/17lottery/public"
DirectoryIndex index.php index.html
<Directory "/var/www/17lottery/public">
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/lot_9xzb-error_log"
CustomLog "logs/lot_9xzb-access_log" common
</VirtualHost>
6.重启Apache