0

I have many sites to configure, each domain targets a specific department, so my virtual host segments are practically the same, I already optimized with include directive, but I think there are other things to squeeze down.

<VirtualHost *:80>
    ServerName www.domain-department-1.com
    DocumentRoot /var/www/html/domain-department-1.com

    <Directory "/var/www/html/domain-department-1.com">
        Include  conf.d/folder-config.conf
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName www.domain-department-2.com
    DocumentRoot /var/www/html/domain-department-2.com

    <Directory "/var/www/html/domain-department-2.com">
        Include  conf.d/folder-config.conf
    </Directory>
</VirtualHost>
0

Use mod_vhost_alias, it's heavily documented https://httpd.apache.org/docs/current/vhosts/mass.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.