Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > General Support > Topic : Customizing VirtualHost Template



Threaded Mode | Print  

 Customizing VirtualHost Template (3 Replies, Read 69279 times)
sparek
Group: Member
Post Group: Working Newbie
Posts: 74
Status:
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.
IP: --   

Customizing VirtualHost Template
sparek
Group: Member
Post Group: Working Newbie
Posts: 74
Status:
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.
IP: --   

Customizing VirtualHost Template
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 5652
Status:
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
IP: --   

Customizing VirtualHost Template
alons
Group: Administrator
Post Group: Super Member
Posts: 2280
Status:
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
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 27, 2024, 4:49 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.183