简体   繁体   English

Apache2读取php文件

[英]Apache2 reading php files

I have a problem in Apache2. 我在Apache2中有问题。 I changed my root directory to certain folder as in /var/www. 我将根目录更改为/ var / www中的某些文件夹。 I have php files under /html folder. 我在/ html文件夹下有php文件。 Whenever I try to open any file under /html folder in web browser using link, it does not show anything. 每当我尝试使用链接在Web浏览器中的/ html文件夹下打开任何文件时,它都不会显示任何内容。

This is how my "default" file looks like. 这就是我的“默认”文件的样子。

<VirtualHost *:80>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/web/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
#
#<Directory /var/www/web/>
#<Directory /home/jenismodi/testFolder/>
# Options Indexes FollowSymLinks MultiViews
#   AllowOverride None
# Order allow,deny
# allow from all
# </Directory>

#   <Directory /var/www/web/html/>
#<Directory /home/jenismodi/testFolder/>
# Options Indexes FollowSymLinks MultiViews
# Order allow,deny
# allow from all
# </Directory>


ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

Can anyone tell me what am I doing wrong here ? 有人可以告诉我我在做什么错吗?

Thanks. 谢谢。 JM JM

您忘记阅读错误日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM