Re: [请益] Apache 新增虚拟主机

楼主: 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 就可以连到这个虚拟网站了

Links booklink

Contact Us: admin [ a t ] ucptt.com