作者:
bency (æž—ç西)
2015-02-07 20:32:50提供另一種作法
suco vim /etc/hosts
127.0.0.1 exam.ple # 新增這一行
example.conf:
<VirtualHost *:80>
ServerAdmin webmaster@example
ServerName exam.ple
DocumentRoot /home/user/example
<Directory /home/user/example>
Options all
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
只要紫色的字串有對到 你在網址列輸入 http://exam.ple 就可以連到這個虛擬網站了