httpd.conf
- 在80端口后增加Listen
Listen 80
Listen 8081
- 打开vhost.conf的注释
Include conf/extra/httpd-vhosts.conf
- 增加读写权限
注意这里事granted
<Directory "/htdocs/xxx">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
httpd-vhost.conf
除了DocumentRoot和端口号,可以根据需要写或者随便写
<VirtualHost *:8081>
ServerAdmin root@xxxxx
DocumentRoot "/home/wxxxx"
ServerName xxxx
ErrorLog "/data/error_log/xxxx"
CustomLog "/data/access_log/xxx"
</VirtualHost>
网友评论