0

I am trying to set up a "tor-service" website, But my virtual machine wont let me open up PHP files in firefox they are just trying to download,

PHP Tries to download when i am running firefox with this server command

python3 -m http.server --bind 127.0.0.1 8000

I believe PHP is installed on the server,

Weird thing is i can open the PHP file if that command is not entered and i just run

 php -S localhost:8000 

And then go to firefox,

Is there anyway of me incorporating the php s line into mine first line ?

I have tried

python3 -m http.server --bind 127.0.0.1 8000 php -S 

But no luck as of yet.

harry0
  • 13
  • 2
  • It can't be done out of the box, because python's web server is not built to serve PHP pages. See https://stackoverflow.com/questions/50921707/how-to-compile-and-send-result-php-code-in-python-http-server and https://stackoverflow.com/questions/12235876/python-simplehttpserver-with-php – aynber Jul 19 '22 at 19:19
  • Thank you! Your links managed to help to get the answer i needed and its working :) – harry0 Jul 19 '22 at 19:39

0 Answers0