N
N
Ninazu2015-12-24 10:29:52
Apache HTTP Server
Ninazu, 2015-12-24 10:29:52

How to set up domains and subdomains for vhost_alias?

The actual settings are like this. And everything works with the exact match of the folder.
dnsmasq
address=/.loc/127.0.0.1
hosts

<VirtualHost *:80>	
  ServerAlias *.loc
  VirtualDocumentRoot /var/www/%0/public_html

  <Directory /var/www/*.loc/>
    Order allow,deny
    Options -Indexes
    Allow from all
    AllowOverride All
  </Directory>
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

How to configure so that the subdomain by a certain mask (admin.{domain}.loc) looks in the same folder as the domain?
Let's say there are
test.loc domains - it looks in the /var/www/test.loc/public_html folder
admin.test.loc - it also needs to look in the /var/www/test.loc/public_html folder instead of /var/www/admin .test.loc/public_html

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question