Find the Full Path To A Virtual Host Directory

This is a quick one, but hopefully some people will find it useful!

This simple script normally returns the full Linux path to your files, e.g.

/var/www/vhosts/leadingedgescripts.co.uk/httpdocs/

Simply create a PHP file with the following contents:

<?php

echo getcwd();

?>

Copy it to your PHP enabled server (using FTP/SFTP etc) and visit it in your web browser.

This tidbit of information can be very useful when configuring a website on a new server.

Comments are closed.