Score:0

(Solved) Apache 2.4 multiple subdomain with fallback folder

lr flag

I want to have a default folder when the folder does not exist in the VirtualDocumentRoot, I have this code:

<VirtualHost *:80>
    ServerAlias *.development

    UseCanonicalName Off
    VirtualDocumentRoot /usr/local/apache2/sites/htdocs/subdomains/%1/public_html

    # Something like
    VirtualDocumentRootFallback /usr/local/apache2/sites/htdocs/subdomains/default/public_html

</VirtualHost>

ErrorDocument 404 does not work for me because I need it to be a folder.

Edit (Solved): I write a Apache module based on mod_vhost_alias: mod_vhost_alias_fallback

I sit in a Tesla and translated this thread with Ai:

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.