Score:0

Apache2 add directory alias only for 2 of 4 server name alias

id flag

I have a .conf file for my Apache2 server. The thing is, I have 4 different subdomains pointing to the same application, but inside the VirtualHost tag I need a Directory with an alias that can only be accessed from 2 of those 4 subdomains.

Here is what I have:

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        ErrorLog /home/rafabradley/logs/error.log
        CustomLog /home/rafabradley/logs/access.log combined

        <Directory /home/rafabradley/anibase-v3/anibase/>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>

        WSGIDaemonProcess anibasessl python-path=/home/rafabradley/anibase-v3 python-home=/home/rafabradley/venv
        WSGIProcessGroup anibasessl
        WSGIScriptAlias / /home/rafabradley/anibase-v3/anibase/wsgi.py


        ServerName anibase.tk
        ServerAlias www.anibase.tk
        ServerAlias media.anibase.tk
        ServerAlias api.anibase.tk
        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /actual/path/to/file
        SSLCertificateKeyFile /actual/path/to/file
</VirtualHost>
</IfModule>

Now, I need a directory alias from /static to /home/rafabradley/anibase-v3/static, but that can only be accessed from www.anibase.tk and from anibase.tk. Is that possible?

djdomi avatar
za flag
afaik serveralias donz need be written 3 times add all alias to obe line
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.