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 就可以連到這個虛擬網站了
--
按了 esc :wq 沒反應,才發現是在批踢踢
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.158.202.35
※ 文章網址: https://www.ptt.cc/bbs/PHP/M.1423312376.A.C6A.html
提供另一種作法
suco vim /etc/hosts
127.0.0.1