Author Topic: setting custom virtual host settings  (Read 13987 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
setting custom virtual host settings
« on: January 10, 2018, 11:26:46 AM »
I'm wondering if someone can provide some guidance on how to potentially go about a more complex deployment.

We currently have a customer that runs their own wordpress website(s) on an internal Linux server. We are in the process of moving them into our infrastructure and are looking at CWP (along with a number of other platforms).

Their current .conf setup for virtual hosts is similar to the following (modified to protect customer identity and to simplify).

Code: [Select]
<VirtualHost *:80>

    ServerName www.domain.com
    ServerAlias domain.com
    DocumentRoot /var/www/wwwroot/domain.com/group
    <Directory /var/www/wwwroot/domain.com>
        Options Indexes followSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    Alias /department1 /var/www/wwwroot/domain.com/dep1
    <Directory /var/www/wwwroot/domain.com/dep1>
        Order allow,deny
        allow from all
    </Directory>

    Alias /department2 /var/www/wwwroot/domain.com/dep2
    <Directory /var/www/wwwroot/domain.com/dep2>
        Order allow,deny
        allow from all
    </Directory>

</VirtualHost>

Each department is a seperate instance of wordpress, which they want to replicate in our environment. They have had no issues with the setup in the past, other than it running in a dedicated apache instance, and not through a control panel of any sort.

Any advice on how to apply the config to CWP.

Thanks
Pabs

Offline
***
Re: setting custom virtual host settings
« Reply #1 on: January 12, 2018, 04:54:47 AM »
Try to customize the vhost tempalte
/admin/index.php?module=file_editor&file=/usr/local/apache/conf.d/vhosts.conf

Then everytime you add an account (for each department), new vhost will be created follow the customized vhost template