Skip to content
Advertisement

Tag: ubuntu-18.04

Running PHP locally with Ubuntu

I am using Ubuntu 18.04 on Google Cloud Platform and I’m trying to run a test file called login.php. The path is /var/www/login.php. Whenever I try running it, I use sudo php -f /var/www/login.php then check http://localhost/var/www/login.php on my web browser. However, my web browser returns with This site can’t be reached, localhost refused to connect. I have looked everywhere

Advertisement