除了 listen 81 修改外,还需要修改ServerName和VirtualHost的端口号。ServerName localhost:81 <VirtualHost *:81> ServerName localhost:81 ServerAlias localhost DocumentRoot /var/www/html <directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from all </directory> </VirtualHost>
<VirtualHost *:81>
ServerName localhost:81
ServerAlias localhost
DocumentRoot /var/www/html
<directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from all
</directory>
</VirtualHost>
你写了全角空格,改成半角空格试试。