This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Adding custom data to vhosts file
#1
Adding custom data to vhosts file
Hello,

How can I add custom data to the vhosts file without editing the OnDaemonRun.hook? I want to add data regarding the sentora server without having a domain added?  

Huh
Reply
Thanks given by:
#2
RE: Adding custom data to vhosts file
I followed this thread http://forums.sentora.org/showthread.php?tid=1183 and created a file with the data that I wanted to add and modified the OnDaemonRun.hook on the apache admin module with


PHP Code:
$line .= "Include /etc/zpanel/configs/apache/custom-data" fs_filehandler::NewLine(); 


Just in case somebody is trying to do the same thing as me its important to add the line above before this line


PHP Code:
$line .= "# Sentora generated VHOST configurations below....." fs_filehandler::NewLine(); 


so you don't mess up the automatically generated data for the other vhosts.
Reply
Thanks given by:
#3
RE: Adding custom data to vhosts file
The proper way is:

Module Admin > Apache config > Either Global VHosts entry (added to all domains) or Global ZPanel/Sentora entry (adds to just the panel vhost section)

Or for specific domains, scroll down to 'Override a virtual host setting' > [select domain] >Custom entry.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#4
RE: Adding custom data to vhosts file
Notice in case of updates it will be overritten that way and you will need to patch it again.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask
Freelance AWS Certified Architect & SysOps// DevOps

10$ free to start your VPS
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
How to set up File Manger for Sentora? donaldaugust 1 3 ,306 01-11-2022, 05:01 AM
Last Post: Nigel
import data error nguoiveday 1 3 ,375 10-24-2021, 07:23 AM
Last Post: TGates
Site Not Updating changes made in The HTML file me7leelee 4 8 ,208 05-20-2020, 06:29 PM
Last Post: 5050

Forum Jump:


Users browsing this thread: 1 Guest(s)