Softaculous


Topic : Customizing VirtualHost Template


Posted By: sparek on October 25, 2022, 5:46 pm
Is there a way to customize the VirtualHost template that is used when adding a user in Webuzo?
This is in reference to the data that is added to
/usr/local/apps/apache2/etc/conf.d/webuzoVH.conf
When a new user is created.

Posted By: sparek on October 25, 2022, 8:18 pm | Post: 1
Unless this already exists and I'm just not able to find it.  I would propose that you have an Apache VirtualHost template some where - maybe: /var/webuzo/templates/apache-virtualhost.conf

With the VirtualHost data in a template format:

Code
<VirtualHost %ip%:80>
    <IfModule security2_module>
        SecRuleEngine Off
    </IfModule>
    <IfModule suexec_module>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup %user% %user%
        </IfModule>
    </IfModule>
    <IfModule ruid2_module>
        RMode config
        RUidGid %user% %user%
    </IfModule>

    ServerName %domain%
    ServerAlias www.%domain%


    DocumentRoot /home/%user%/public_html
    <FilesMatch \.(php|phtml)$>
        <If "-f %{REQUEST_FILENAME}">
            SetHandler "proxy:unix:/usr/local/apps/php73/var/fpm-%user%.sock|fcgi://localhost"
        </If>
    </FilesMatch>
    <IfModule alias_module>
        ScriptAlias /cgi-bin/ /home/%user%/public_html/cgi-bin/
    </IfModule>

    ServerAdmin %email%
    ErrorLog /usr/local/apps/apache2/logs/%domain%.err
    CustomLog /usr/local/apps/apache2/logs/%domain%.log combined
</VirtualHost>


Such that when you take the input from adding a user, you can add the VirtualHost entry with:

cat /var/webuzo/templates/apache-virtualhost.conf | sed s/%user%/$user/g | sed s/%domain%/$domain/g | sed s/%email%/$email/g >>/usr/local/apps/apache2/etc/conf.d/webuzoVH.conf

This would allow individual administrators to modify the Apache template to better suit their own needs.

Posted By: Brijesh on November 14, 2022, 6:26 am | Post: 2
Hi,

Thank you for the suggestion.

We will try to add this soon.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: alons on November 14, 2022, 10:35 am | Post: 3
Quote From : Brijesh November 14, 2022, 6:26 am
Hi,

Thank you for the suggestion.

We will try to add this soon.


Hi,

We have added apache2_pre_vh_write in apache2 which will be launched with the 3.5.8.
For the bind hook, create_dns_zone with priority less than 10 is before writing the data.

Regards

-----------------------
For immediate support please email us at our Support email address. PMs sent to any Softaculous Team member or posting in the forums is not the official way to get support.

Virtualizor - The Next Generation VPS Panel
Webuzo - It is Softaculous Standalone for Enterprises, SMB, Developers. Deploy it on Dedicated Servers, VPS, Virtual Appliances or the Cloud
Pinguzo - Server and Domain Monitoring tool
PopularFX - Marketplace of WordPress, Drupal, Joomla, Bootstrap themes
Remote Installer - Use Softaculous over FTP/FTPS/SFTP

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.