我在WINDOWS上成功安裝了Apache,並且可以打開一個HTML文件的問題。我也在服務器上安裝了PHP。我配置Apache和PHP爲每followng教程: http://www.sitepoint.com/how-to-install-apache-on-windows/ http://www.sitepoint.com/how-to-install-php-on-windows/爲PHP配置httpd.conf(您無權訪問此服務器上的/php/php-cgi.exe/index.php。)
如前所述阿帕奇可以讓我在我的網站打開HTML文件。添加一個PHP文件時,我得到錯誤: You don't have permission to access /php/php-cgi.exe/index.php on this server.
PHP安裝在c:\ PHP和在C apached:\ apache24
我已經嘗試了幾個選項來修復https.conf文件,但沒有任何成功。
我的配置文件片斷如下:
<Directory "c:/WebPages">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
##Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
##AllowOverride None
#
# Controls who can get stuff from this server.
#
##Require all granted
#Options FollowSymLinks
AllowOverride None
Options None
Require all granted
Allow from all
</Directory>
這樣我就可以查看HTML文件,但不是PHP所以上午thinkign我需要讓權限到C:\ PHP文件夾,但不知道是什麼?
任何意見歡迎。一如既往地感謝。
爲什麼要自己安裝所有的東西,當你只需要安裝一個WAMP類型的包併爲你完成所有的工作,包括爲你設置適當的文件系統權限? –
嗨馬克,WAMP不是用於開發環境,不建議用於生產服務器? – Smudger
wamp只是預包裝(W)indows版本的(A)pache,(M)ysql和(P)HP。他們即將生產就像任何其他自己安裝的相同應用程序一樣。 –