apache-2.4.x把NameVirtualHost取消了
删除了 Order deny,allow 和 Order allow,deny
Deny from all ==》 Require all denied
Allow from all ==》 Require all granted
Allow from 192.168.10.21 ==》 Require host 192.168.10.21
一般虚拟主机的配置模板如下:
<VirtualHost 192.168.10.81:80>
ServerAdmin rocdk890@gmail.com
directoryIndex index.html index.php index.htm index.shtml login.php
ServerName 192.168.10.81
DocumentRoot /var/www/vhosts/wwwroot
<Directory "/var/www/vhosts/wwwroot">
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
更多精彩内容:各种AI课程、技能课程、黑科技软件、网站小程序源码、副业小项目、PPT模板等精品素材、电商课程、推广引流课程等,尽在 天边资源网 。