douzhi2760 2019-02-17 14:34
浏览 143

如何重置Apache

I installed apache server using sudo dnf install httpd. I started and enabled the httpd service. I installed php using sudo dnf install php. The Apache welcome page appears.

Then I wrote this program and moved it into /var/www/html:

<?php
phpinfo();
?>

The program is called index.php which should load when I go to localhost. But I see this message instead:

access denied output

Where am I going wrong? I confirmed httpd is running(active).

Edit: I had messed up one of the httpd configurations last time. That's why I had to reinstall. I deleted the /etc/httpd directory and then re-installed but I feel the settings have somehow persisted.

Edit ls -al /var/www/html gives this output:

drwxr-xr-x. 2 root   root  4096 Jan 23 18:10 .
drwxr-xr-x. 4 root   root  4096 Jan 23 18:10 ..
-rwxrwx---. 1 apache Hemil   20 Feb 17 18:17 index.php
  • 写回答

1条回答 默认 最新

  • douqi3064 2019-02-18 17:19
    关注

    Deleted the fedora paritition. Re-installed Fedora, apache and php. It works now

    评论

报告相同问题?

悬赏问题

  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?