目前我使用的 Apache 的版本是 2.2.3,前幾天心血來潮,想看看哪些 Module 可以不用載入的,所以到官網去查資料,修改了一下 httpd.conf 。
底下相關路徑請自行修改

LoadMoudle 部份,我只載入下面的 Module:
  • actions_module (*)
  • alias_module (*)
  • authz_host_module
  • cgi_module (*)
  • dir_module
  • mime_module
  • userdir_module
  • php5_module

上面有(*)的是執行CGI模式所必須增加的。

而關於php5的設定如下:

# For PHP 5 do something like this:
ScriptAlias /php/ "D:/Program/php/"
LoadModule php5_module "D:/Program/php/php5apache2_2.dll"
#Action application/x-httpd-php "/php/php-cgi.exe"
AddType application/x-httpd-php .php

# configure the path to php.ini
<IfModule php5_module>
    PHPIniDir "D:/Program/php"
</IfModule>

除此之外還有三個地方要改:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Satisfy all
</Directory>

改成

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
    Satisfy all
</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

改成

<IfModule dir_module>
    DirectoryIndex index.php index.htm index.html
</IfModule>

增加:

<IfModule userdir_module>
UserDir D:/Website
</IfModule>
arrow
arrow
    全站熱搜

    HACGIS 發表在 痞客邦 留言(0) 人氣()