<VirtualHost 127.0.0.2:80> ServerName www.terrify.com DocumentRoot "G:/workSpace/terrify" <Directory "G:/workSpace/terrify"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> DirectoryIndex index.html index.htm index.php </VirtualHost>这样呢? 每次改完记得重启Apache再试。
Index of / • shop/ 我想地址栏输入www.terrify.com 。能直接访问网站 进入之后报date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. 这个好像是时间问题,改了也不行
<VirtualHost *:80>
ServerName www.terrify.com
DocumentRoot "G:\www\apache2.2\htdocs\terrify" //terrify是指向的项目目录
</VirtualHost>
127.0.0.2 www.terrify.com host文件需要加上这样么。但是这样,我访问www.terrify.com 为什么是 it works
版主,我看了还是不行,我的设置如下,www目录下分别安装了php ,apache和mysql。 在host文件中,127.0.0.2 域名只向 www.terrify.com
然后比如我把YII框架安装在G:/workSpace/terrify/ 这个目录下。
apache下 http-vhosts.conf 配置如下 :
<VirtualHost 127.0.0.2:80>
ServerName www.terrify.com
DocumentRoot "G:/workSpace/terrify"
DirectoryIndex index.html index.htm index.php
</VirtualHost>
为什么yii框架安装好以后,访问www.terrify.com 依旧是it works
# Virtual hosts
Include conf/extra/httpd-vhosts.conf http-vhosts.conf 中下行是否打开了:
NameVirtualHost *:80
http.conf里
# Virtual hosts
#Include conf/extra/httpd-vhosts.confhttp-vhosts.conf
NameVirtualHost *:80
我觉得是不是http.conf设置documentRoot的原因
ServerName www.terrify.com
DocumentRoot "G:/workSpace/terrify"
<Directory "G:/workSpace/terrify">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html index.htm index.php
</VirtualHost>这样呢? 每次改完记得重启Apache再试。
• shop/
我想地址栏输入www.terrify.com 。能直接访问网站
进入之后报date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
这个好像是时间问题,改了也不行
令 php.ini 中
date.timezone = PRC也可在程序里执行
date_default_timezone_set('PRC');
比较麻烦,如无特殊需要,还是在 php.ini 中设置较好。一劳永逸
不是第一次使用,而是配置了yii框架要虚拟主机,搞得惨了 PRC也没用
那就
date.timezone = Asia/Shanghai
DocumentRoot "G:/workSpace/terrify/shop"