Apache alias for a specific domain

I had this alias on a single domain Apache2 installation:

Alias /cgihtml/ /usr/lib/cgi-bin/html/

Now with Hestia I need to include it for just a signle domain.

Any advice? TIA

Regards,

You have two options, create a web template for your domain, add the Alias directive to the template and assign the new template to your domain but I think that for this use case, the easiest approach is to add an apache.conf_* file to the existing conf.

For example, if you user is iozuniga and your domain is example.com, create a file apache.conf_alias with the Alias directive, then create a symlink for apache2.ssl.conf_alias and restart apache2.

cd /home/iozuniga/conf/web/example.com/
echo 'Alias /cgihtml/ /usr/lib/cgi-bin/html/' > apache2.conf_alias
chown root:iozuniga apache2.conf_alias
ln -s apache2.conf_alias apache2.ssl.conf_alias
systemctl restart apache2

Edit: fixed the name of apache conf files (I used apache.* instead of apache2.*)

1 Like

Thank you very much. It worked nicely. The only thing I changed is the file name, from apache.conf_alias to apache2.conf_alias. That’s all. Really, very grateful.
Regards,

2 Likes

Glad it worked.

Sorry for the wrong conf names :frowning: , I fixed it in my original post.