apache php 配置 CI 架構

來源:互聯網
上載者:User

標籤:

聲明:佈建網域名需要用到  httpd.conf  httpd_vhosts.conf  (apache) 中兩個檔案 和   hosts (C:\Windows\System32\drivers\etc) 

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

一  是開啟重寫地址模組   二 是開啟引用httpd-vhosts.conf檔案

如不想把程式放在htdoc檔案夾下,須設定apache\conf\httpd.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目錄下。

修改apache\conf\extra\httpd-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:\Windows\System32\drivers\etc\hosts檔案

127.0.0.1    xhdoctor.ci.com

修改F:\CI\xhdoctor\application\config\config.php檔案,

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

 

apache php 配置 CI 架構

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.