找到 /etc/apache2/sites-enabled/ 下的虚拟主机配置文件:
<VirtualHost *:80>
ServerAdmin bjiokn@163.com
DocumentRoot /var/www/tx
ServerName www.Twang.com
ServerAlias Twang.com
DirectoryIndex index.htm
AddDefaultCharset "gb2312"
<Directory /var/www/tx/>
IndexOptions Charset=gb2312
Options Indexes FollowSymLinks MultiViews
allow from all
DirectoryIndex index.htm
</Directory>
</VirtualHost>
注意红色文字!!
转载于:https://blog.51cto.com/bjiokn/492436