Contents
php resides in /var/www/html and handles all requests for “/”. If your app file is test. php, then try placing it in /var/www/html/test. php and you can browse to it directly.
Where is PHP on Linux?
The default location for the php. ini file is: Ubuntu 16.04:/etc/php/7.0/apache2. CentOS 7:/etc/php.
Where are PHP files stored in Ubuntu?
On Ubuntu the folder is /var/www/html , NOT /var/www . You will need root access for that. So you save the file as /var/www/html/hello. php .