|
|
发表于 2006-6-14 19:30:23
|
显示全部楼层
菜鸟遇到困难了,恳请大虾帮忙啊
测试PHP
# vi /usr/local/apache/htdocs/index.php
<?
phpinfo();
?>
:wq
重新启动apache服务器
# /usr/local/apache/bin/apachectl restart
浏览器里127.0.0.1测试一下,能否看到PHP字样
我测试php的时候显示:
Not Found
The requested URL /index.php was not found on this server.
Apache/2.0.52 (Fedora) Server at 127.0.0.1 Port 80
我看不到php字样阿,安装的时候一切正常,在安装php的时候,配置php时也提示了 thankyou for using php,也按照楼主的提示改了配置文件
apache配置文件httpd.conf如下,恳请哪位大虾解惑啊,不胜感激
ServerRoot "/usr/local/apache"
Listen 80
LoadModule php5_module modules/libphp5.so
<IfModule !mpm_netware_module>
User daemon
Group daemon
</IfModule>
ServerAdmin you@example.com
DocumentRoot "/usr/local/apache/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/usr/local/apache/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
<FilesMatch "^\.ht">
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/ "/usr/local/apache/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/usr/local/apache/cgi-bin">
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
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddDefaultcharset gb2312
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule> |
|