Apache2不提供PHP脚本

时间:2018-07-02 11:13:42

标签: php apache2

我已经在网上搜索了几天,将所发现的内容应用到我的配置中,但仍然无法在本地计算机上使用php。我无所适从,至少可以沮丧!

在64位Linux Mint 18 Cinnamon上运行,并且非常确定Ive遍历了所有其他配置文件(否则需要进行编辑才能配置php),我处于停滞状态!以下是我的Apache2文件。

apache2.conf

ServerRoot "/etc/apache2"
The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
Mutex file:${APACHE_LOCK_DIR} default
PidFile: The file in which the server should record its process
identification number when it starts.
This needs to be set in /etc/apache2/envvars
PidFile ${APACHE_PID_FILE}
Timeout: The number of seconds before receives and sends time out.
Timeout 300

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off

<Directory />
 Options FollowSymLinks
 AllowOverride None
 Require all denied
</Directory>

<Directory /usr/share>
 AllowOverride None
 Require all granted
</Directory>

<Directory /var/www/>
 Options Indexes FollowSymLinks
 AllowOverride None
 Require all granted
</Directory>

<Directory /srv/>
 Options Indexes FollowSymLinks
 AllowOverride None
 Require all granted
</Directory>

<FilesMatch "^\.ht">
   Require all denied
</FilesMatch>

然后     dir.conf

<IfModule mod_dir.c>
 Directory Index index.php index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

我一直在阅读对 httpd.conf 文件的引用,但是该文件不存在。我想在安装后手动创建自己的吗?

在导航到http://localhost/

时,我得到的只是以下错误
**Error**
Not found: vhost: localhost

过去,我从不费心创建单独的站点/虚拟主机。我唯一感兴趣的是导航到/ var / www / html目录时获取php服务。 任何帮助将不胜感激!@

0 个答案:

没有答案