Sentora Support Forums
Using Custom Vhost Entries for Webmail, MySQL, Etc. - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: Community Guides & How-To's v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=33)
+---- Thread: Using Custom Vhost Entries for Webmail, MySQL, Etc. (/showthread.php?tid=495)

Pages: 1 2 3 4 5 6 7 8 9


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - emiliogq - 08-13-2015

Hello, I've installed zpanel 10.1.1 and we put in httpd-vhost this:

(02-03-2015, 11:13 PM)Diablo925 Wrote: On Linux

Remember to add </VirtualHost> at the start

and no </VirtualHost> at the end Smile

Webmail:
Code:
</VirtualHost> # Configuration for WebMail <VirtualHost *:80>  ServerAlias webmail.*  DocumentRoot "/etc/sentora/panel/etc/apps/webmail/"  AddType application/x-httpd-php .php  <Directory "/etc/sentora/panel/etc/apps/webmail/">  Options +FollowSymLinks -Indexes  AllowOverride All  Require all granted  </Directory> 
Phpmyadmin / Mysql
Code:
</VirtualHost> # Configuration for PHPmyadmin    <VirtualHost *:80>  ServerAlias pma.*  DocumentRoot "/etc/sentora/panel/etc/apps/phpmyadmin/"  AddType application/x-httpd-php .php  <Directory "/etc/sentora/panel/etc/apps/phpmyadmin/">  Options +FollowSymLinks -Indexes  AllowOverride All  Require all granted  </Directory>

And I've any problem but when past the time, zpanel resets this file and removes this configuration. Do anyone know could I stop it?

Thanks
Emilio


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 08-13-2015

It tells you how in the first post...


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - imrane555 - 08-27-2015

i have default page (Your hosting space is ready...) when i try this ...


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - henrique araujo - 08-27-2015

here tooSad


(08-27-2015, 05:51 AM)imrane555 Wrote: i have default page (Your hosting space is ready...) when i try this ...



RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - imrane555 - 08-28-2015

(08-27-2015, 10:20 PM)henrique araujo Wrote: here tooSad


(08-27-2015, 05:51 AM)imrane555 Wrote: i have default page (Your hosting space is ready...) when i try this ...

it is because centos i think


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - henrique araujo - 08-29-2015

i use ubuntu :/

(08-28-2015, 12:03 AM)imrane555 Wrote:
(08-27-2015, 10:20 PM)henrique araujo Wrote: here tooSad


(08-27-2015, 05:51 AM)imrane555 Wrote: i have default page (Your hosting space is ready...) when i try this ...

it is because centos i think



RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 08-29-2015

I think it has to do with this section:

Code:
       <Directory />        Options FollowSymLinks Indexes        AllowOverride All        Order Allow,Deny        Allow from all        </Directory>
As it is different depending on OS, and PHP version.


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - henrique araujo - 08-29-2015

i use this versio of php:
PHP Version 5.6.12-1+deb.sury.org~trusty+1


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - kharl - 11-08-2015

I have done this on CentOS 7 and Sentora 1.0.3 for Webmail as a subdomain and it appears to work with no problems.

Create the subdomain as usual using the Subdomain UI.  After Sentora creates the subdomain , open a terminal and type the following changing any of the capitalized code to fit your configuration:

Code:
cp /var/sentora/USERNAME/hostdata/public_html/webmail_DOMAIN_TLD/* /var/sentora/USERNAME/hostdata/public_html/webmail_DOMAIN_TLD.backup ln -s /etc/sentora/panel/etc/apps/webmail /var/sentora/USERNAME/hostdata/public_html/webmail_DOMAIN_TLD

I hope that I have the cp command right.  I use so many different systems that I tend use desktops to do this so I don't have to remember all the intricacies of each OS.  If not, please feel free to correct me and I'll make the appropriate edit.

Goto Module Admin, Apache Config.  Under Override a Virtual Host Setting select the subdomain that you just created.  In the Custom Entry box enter the following code again changing any of the capitalized code to fit your configuration:

Code:
php_admin_value open_basedir "/var/sentora/hostdata/USERNAME/hostdata/public_html/webmail_DOMAIN_TLD:/var/sentora/temp/:/etc/sentora/configs/roundcube/:/var/sentora/logs/roundcube/"

Click Save Vhost and wait for the changes to be applied.


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - bbspike - 11-11-2015

(02-16-2015, 04:03 AM)TGates Wrote:
Code:
ServerAlias webmail.*
Possibly this line. I have tried it in the past also with no luck, I settled on using:
Code:
Alias /webmail /etc/sentora/panel/etc/apps/webmail
as a Global Vhost Entry in Module Admin > Apache Config.
This allows all domains and subdomains to use domain.com/webmail to access roundcube and has worked without flaw for a few years now.
(I also use a similar variation for external phpmyadmin login.)
Doing it this way also prevents clients from having to add a webmail record to their DNS settings. Much easier for everybody Wink

You need to lose Required all Granted line.
Works fine then for me.