Some CMSs ask, during installation or in their configuration, for the absolute path of your website on the server. On the Apanel platform, it has the form /home/yourUsername/YourDomain for the main domain: the beginning (/home) can vary depending on the server that hosts your account, and the website directory may have been changed. The Apanel console gives you the exact value.
In short: in Hosting management, Website card, click Apache configuration and read the Document root field: the absolute path joins the account directory and the website directory, for example /home/yourUsername/yourdomain.ch.
Prerequisites
- Being a client hosted on the Apanel platform, with access to the Apanel console.
Where do I find the path in the Apanel console?
- Log in to your Apanel console and open the Hosting management of your domain.
- In the Website card, click Apache configuration.
- Read the Document root field: it shows as a prefix the directory of your account (for example
/home/yourUsername), then the website directory (for example /yourdomain.ch). The absolute path is the two put together: /home/yourUsername/yourdomain.ch.
Do not modify this field: here it is only used to read the path.
What is the difference between an absolute and a relative path?
Absolute path:
- Starts at the root of the file system, with "/".
- Gives the complete location of a file or folder, regardless of the current directory.
- Example:
/home/yourUsername/yourdomain.ch/index.php
Relative path:
- Starts from the current directory and does not start with "/".
- Depends on the location from which it is read.
- Example:
images/logo.png
When a CMS asks for an absolute path, a relative path will not work.
Going further