- Obtaining the product package
- Installing on Linux
- Installing on Windows
- Finalizing the installation
- Redirecting to HTTPS
- Protecting data directory
Obtaining the product package
Before installing the product, make sure your server meets the minimal system requirements.
You can download the package of WebMail Pro from:
https://afterlogic.com/download/webmail-pro-php.zip
Installing on Linux
Extract the package into your web root. If deploying remotely, upload the extracted files to your server. In the following examples, we'll assume you've created a directory called webmail in the root of your web space (web root) and placed the package contents there. The application will then be available at: http://your_domain/webmail
Examples (assuming you wish to use webmail name for the target directory):
- in case of SSH access to a dedicated server, the web root usually looks like
/var/www/html. Thus, you should create /var/www/html/webmail directory and place the application files/directories there. - in case of uploading via FTP on a shared hosting, the web root is usually something like
/public_html and you should create and upload into /public_html/webmail directory.
Note: It's critical that the data directory is writable by the web server — and just as critical that the rest of the application files are not.
The strongly recommended and most secure approach is to set ownership so that the application code belongs to root (read-only for the web server) while only the data directory belongs to the web server user. This limits what an attacker could modify even if the web application itself is compromised. For example:
chown -R root:root /var/www/pro
chown -R www-data:www-data /var/www/pro/data
Note that web server users differ between operating systems (www-data, apache, nginx, etc.), but the principle stays the same: application code should be owned by root, and only data should be owned by the web server user.
This ownership scheme should be used whenever possible. Only as a last resort, if changing ownership genuinely cannot be done on your hosting environment, fall back to adjusting permissions so the web server can write to the data directory:
chmod -R 0755 /var/www/pro/data
This fallback is less secure than the root/www-data ownership split above and should be avoided when possible. Always avoid granting broader permissions than necessary, and never use 777 outside of temporary troubleshooting.
Installing on Windows
Extract the package into your web root. If deploying remotely, upload the extracted files to your server. In the following examples, we'll assume you've created a folder called webmail in the root of your web space (web root) and placed the package contents there. This way, you'll be able to access the application through the web at the URL of the following kind: http://your_domain/webmail
Examples (assuming you want to use webmail name for the target folder):
- in case of Remote Desktop access to a dedicated server, the web root usually looks like
C:\Inetpub\wwwroot\. Thus, you should create C:\Inetpub\wwwroot\webmail folder and place the application files/folders there. - in case of uploading via FTP on a shared hosting, the web root is usually something like
/wwwroot and you should create and upload into /wwwroot/webmail folder.
Note: It's important to make sure data directory is writable by web server.
You can skip the following step if all of the below is true:
● you only have FTP access to your server;
● you do not have a web control panel (like WHM or Plesk) at all or it does not allow setting permissions;
● you have no other options to set permissions.
If all of the above is true (usually, shared hosting with preconfigured permissions), the permissions should be OK but if they are not and the hosting provider does not allow you to set them, you will need to contact their support to do this for you.
The following steps allow you to assign necessary permissions. We're assuming this is done via Remote Desktop access.
- using Windows Explorer, navigate to the folder which contains the
data folder; - in the context menu, choose "Properties" of the
data folder and "Security" tab; - add Internet Guest Account (usually IUSR_...) into the list;
- tick "Allow full control" checkbox to grant permissions and press "OK".
If assigning the permissions doesn't seem to have any effect, repeat the same steps, but instead of granting "Full Control" to Internet Guest Account (usually IUSR_...) account, grant the same permission to Everyone user.
If your hosting control panel provides some kind of a file manager, i.e. a tool which shows you all files and folders and allows you to set set permissions for files and folders, you should set the same permissions as in case of Remote Desktop or direct access.
Also in case of IIS, it's strongly recommended to relocate data folder out of web root for security reasons, see Protecting data directory documentation page for more infor.
Finalizing the installation
It is advised to run Compatibility test to check that server meets the requirements, and that data directory has correct permissions set.
Upon installing the product, you'll need to configure your installation.
Redirecting to HTTPS
Running WebMail Pro over HTTPS is strongly recommended for both security and compatibility. Some authentication providers (such as Google OAuth) require HTTPS and will not function over plain HTTP.
To enable automatic redirect from HTTP to HTTPS, set RedirectToHttps to true in data/settings/config.json file.
Protecting data directory
All configuration files of the application and user data are stored in data directory, so it's important to protect data directory to make sure that users cannot access that directory over the Internet directly.