版本:2.2
步骤一:查看apache安装目录
find / -name httpd.conf
步骤二:创建文件夹extra/httpd-vhosts.conf,并引入
<VirtualHost *:80> ServerName www.1223.net DocumentRoot "/var/www/html/public" <Directory "/var/www/html/public"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
步骤三:重启 service httpd restart