作者bency (林班西)
看板PHP
标题Re: [请益] Apache 新增虚拟主机
时间Sat Feb 7 20:32:50 2015
提供另一种作法
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 就可以连到这个虚拟网站了
--
按了 esc :wq 没反应,才发现是在批踢踢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 49.158.202.35
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/PHP/M.1423312376.A.C6A.html