Score:0

Anyone know how to fix this 403 - Forbidden error when trying to view my lighttpd info.php file?

bd flag

I'm working on a lab project for one of my cybersecurity classses and am getting an error message where one shouldn't be. We are using lighttpd and I also installed the programs below: php, php-cgi, php-mysql, and php-fpm.

I then created an info.php file containing:

<?php phpinfo(); ?>

The lighttpd localhost page loads fine, as seen below, but localhost/info.php does not.

lighttpd localhost loads fine.

localhost/info.php gives error 403.

Thank you all so much.

*Edit: Changed localhost/php.info to localhost/info.php

Soren A avatar
mx flag
What is the output f `ls -l php-info` in the http root dir ? And what user is running th webserver ?
FiteNite avatar
bd flag
@SorenA The resulting output is as follows: ls: cannot access 'php-info' no such file or directory. I'm running as an administrator.
FiteNite avatar
bd flag
@matigo The name of the file is 'info.php'
Score:0
cn flag

sudo lighty-enable-mod fastcgi

sudo lighty-enable-mod fastcgi-php

sudo systemctl restart lighttpd

Fixed this problem on my system.

FiteNite avatar
bd flag
Thank you so much!!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.