apache php 配置 CI 框架

声明:配置域名需要用到  httpd.conf  httpd_vhosts.conf  (apache) 中两个文件 和   hosts (C:WindowsSystem32driversetc) 

****** 一  LoadModule rewrite_module modules/mod_rewrite.so   二    Include conf/extra/httpd-vhosts.conf  ******

一  是开启重写地址模块   二 是开启引用httpd-vhosts.conf文件

如不想把程序放在htdoc文件夹下,须设置apacheconfhttpd.conf文件,修改DocumentRoot路径与Directory路径的值,并保持一致。假设要将CI框架放在F盘CI目录下

DocumentRoot "F:CI"

<Directory "F:CI">

在CI目录下新建文件夹test。下载CodeIgniter_2.1.0,将CodeIgniter_2.1.0文件夹里的application、system、index.php、license.txt复制到xhdoctor_server目录下。

修改apacheconfextrahttpd-vhosts.conf文件,添加以下代码。

<VirtualHost *:80>
DocumentRoot "f:/CI/xhdoctor_server/index"
ServerName xhdoctor.ci.com
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
Allow from all
</Directory>
</VirtualHost>

修改C:WindowsSystem32driversetchosts文件

127.0.0.1    xhdoctor.ci.com

修改F:CIxhdoctorapplicationconfigconfig.php文件,

$config['base_url']    = 'http://xhdoctor.ci.com/';