我正在使用 ubuntu 13.10 操作系统和 LAMP、Apache 2.4。
我想在 apache 上创建一个虚拟主机。我尝试了一些代码,但没有成功。
进行了以下修改。但它不起作用。
首先,我更改HostnameLookups off
为HostnameLookups on
存档etc\apache2\apache2.conf
。然后我添加了以下代码,
<VirtualHost *:80>
ServerName local.scholarships.theiet.in
DocumentRoot /home/www/my_project/public_html
<Directory path_to_code_base/public>
Options -Indexes
Require all granted
DirectoryIndex index.php
AllowOverride All
</Directory>
</VirtualHost>
重启 apache 后我跑了http://localhost/
。该网站未加载。
运行时如何加载我的网站http://localhost/