我的 /etc/apache2/sites-available 中有虚拟主机设置,文件名为 roomstaysback。
<VirtualHost *:80>
DocumentRoot "/var/www/roomstaysback/public"
ServerName roomstaysback
#This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "/var/www/roomstaysback/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
我的 /etc/hosts 文件包含以下内容:
127.0.0.1 roomstaysback
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
启用的站点还包含 roomstaysback 并且它已正确启用。我的代码在 /var/www/roomstaysback/public 中,它还包含具有适当 mod 重写规则的 .htaccess 文件。
但是当我尝试在浏览器中打开 roomstaysback 时,它什么也没有显示(空白页)。
我的虚拟主机是否配置正确。如果是,那么问题应该出在哪里。如果没有,那么有助于正确配置它。谢谢.....