What could go wrong in practice if we replace this symlink by an Alias directive:
Alias /postfixadmin /srv/postfixadmin/public;
I provide my own theoretical answer to the question, but I would like to know if it is verified in practice. My answer is that it is very unlikely that postfixadmin makes use of the difference between the symlink and the Alias directive, because postfixadmin has no need for the original path and its content. Apache manages the symlink correctly (not as PHP does, see bug https://bugs.php.net/bug.php?id=46814 ) , i.e., if you ask Apache what is the path of a symlinked script with $_SERVER["SCRIPT_FILENAME"] , it does not resolve the symlink . Postfixadmin is unlikely to use that. It wants to behave as if it was an Alias directive.
I am aware that with an Alias directive, we need to add a directory directive for the target, but this can be seen as a good thing.
Last edit: Dominic Mayers 2019-11-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Perhaps you should mention the need for a directory directive if postfixadmin is outside the server root. As you know, the web server does not resolve the symlink, so the existing directory directive applies. This is not true with an Alias directive.
Last edit: Dominic Mayers 2019-11-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The installation instruction (https://github.com/postfixadmin/postfixadmin/blob/master/INSTALL.TXT) says that we must create a symlink:
$ ln -s /srv/postfixadmin/public /var/www/html/postfixadmin
What could go wrong in practice if we replace this symlink by an Alias directive:
Alias /postfixadmin /srv/postfixadmin/public;
I provide my own theoretical answer to the question, but I would like to know if it is verified in practice. My answer is that it is very unlikely that postfixadmin makes use of the difference between the symlink and the Alias directive, because postfixadmin has no need for the original path and its content. Apache manages the symlink correctly (not as PHP does, see bug https://bugs.php.net/bug.php?id=46814 ) , i.e., if you ask Apache what is the path of a symlinked script with
$_SERVER["SCRIPT_FILENAME"]
, it does not resolve the symlink . Postfixadmin is unlikely to use that. It wants to behave as if it was an Alias directive.I am aware that with an Alias directive, we need to add a directory directive for the target, but this can be seen as a good thing.
Last edit: Dominic Mayers 2019-11-05
You can use an Alias without problem - works here since more than a year ;-)
BTW: I just added the Alias way as an option in INSTALL.TXT.
Perhaps you should mention the need for a directory directive if postfixadmin is outside the server root. As you know, the web server does not resolve the symlink, so the existing directory directive applies. This is not true with an Alias directive.
Last edit: Dominic Mayers 2019-11-05