1.修改 /etc/apache2/ports.conf
增加 NameVirtualHost *:8080 Listen 8080
用来监听相应的端口
2.修改对应的虚拟主机文件 /etc/apache2/sites-enabled/yjiang
<VirtualHost *:8080>
ServerName yjiang.blog
ServerAdmin webmaster@localhost
RewriteEngine On
RewriteOptions Inherit
DocumentRoot /home/yjiang/letou/blog
<Directory /home/yjiang/letou/blog/>
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/yjiang.blog-error.log
CustomLog /var/log/apache2/yjiang.blog-access.log combined-time
</VirtualHost>