php+apache2部署-可以访问txt但是fastcgi的php却403访问不了?解决办法

WBOY
Freigeben: 2016-06-13 13:44:55
Original
870 Leute haben es durchsucht

php+apache2部署--可以访问txt但是fastcgi的php却403访问不了??
java比较熟悉、php写过helloworld而已、 部署方面是弱项!!! (帮人家修改项目、代码用的是php)
httpd测试说配置正常!! httpd.exe \t
手动查我的几个目录都好像权限正常:包括web跟文件夹目录、php安装目录和可执行文件、apache2.2的文件夹权限好像也正常;

##第一种情况,服务器已经启动; 
##可以访问txt和html,但是访问不了php,提示403;
##httpd.conf的配置如下:

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--># install php handler
LoadModule php5_module "E:/PHP/php5apache2_2.dll" 
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html 

ServerRoot "E:/Program Filesn/Apache2.2"
Listen 10086
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
<ifmodule>
<ifmodule>
User daemon
Group daemon
</ifmodule>
</ifmodule>
ServerAdmin yangzhijiang675@gmail.com
DocumentRoot "G:/etone_www"
<directory></directory>
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    allow from all

<directory>
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride None
    Order allow,deny
    Allow from all
</directory>
<ifmodule dir_module>
    DirectoryIndex index.php default.php index.html
</ifmodule>
<filesmatch>
    Order allow,deny
    Deny from all
    Satisfy All
</filesmatch>
ErrorLog "logs/error.log"
LogLevel warn
<ifmodule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    <ifmodule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </ifmodule>
    CustomLog "logs/access.log" common
</ifmodule>
<ifmodule alias_module>
    ScriptAlias /cgi-bin/ "E:/Program Filesn/Apache2.2/cgi-bin/"
</ifmodule>
<ifmodule cgid_module>
</ifmodule>
<directory filesn>
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</directory>
DefaultType text/plain
<ifmodule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
</ifmodule>
<ifmodule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</ifmodule>

Nach dem Login kopieren


##第二种情况使用handler、这个比较诡异:服务器已经启动:
##php可以访问helloworld、txt也可以访问 、但是我真正要访问的“大多数php文件”都好像没经过这个handler的处理;
##logs\errors.log也没记录是什么问题;

# install php handler
#LoadModule php5_module "E:/PHP/php5apache2_2.dll" 
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php .html 


# install php fastcgi 我已经复制和下载到apache的modules文件夹
LoadModule fcgid_module modules/mod_fcgid.so  
FcgidInitialEnv PHPRC "E:/php" 
Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!