![]() |
|
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) |
Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 10-22-2014 You can use these custom vhost entries to customize sub-domains for various apps: NOTICE: This could be vulnerable as the sub domains are not locked down using suhosin. Use at your own risk! Module Admin>Apache Config>Override a Virtual Host Setting>[select domain]>Custom Entry (Customize file/folder paths to work with your server setup.) (NOTE: Do NOT add these sub-domains in the sub-domain module!) Code: Code: </VirtualHost>
# Configuration for phpMyAdmin - mysql.yoursite.tld
<VirtualHost *:80>
ServerAdmin webmaster[at]yoursite.tld
DocumentRoot "/etc/sentora/panel/etc/apps/phpmyadmin/"
ServerName mysql.yoursite.tld
AddType application/x-httpd-php .php3 .php
<Directory />
php_admin_value open_basedir /etc/sentora/panel/etc/apps/phpmyadmin
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
# Configuration for WebMail - webmail.yoursite.tld
<VirtualHost *:80>
ServerAdmin webmaster[at]yoursite.tld
DocumentRoot "/etc/sentora/panel/etc/apps/webmail/"
ServerName webmail.yoursite.tld
AddType application/x-httpd-php .php3 .php
<Directory />
php_admin_value open_basedir # Alias for roundcube WebMail login
Alias "/webmail" "/etc/sentora/panel/etc/apps/webmail"
<Directory "/etc/sentora/panel/etc/apps/webmail/">
php_admin_value open_basedir /var/sentora/temp/:/etc/sentora/panel/etc/apps/webmail:/var/sentora/logs/roundcube
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>NOTE: Changes may take up to 48 hours to work! Be patient RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - Diablo925 - 02-03-2015 On Linux Remember to add </VirtualHost> at the start and no </VirtualHost> at the end ![]() 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> 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>RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - Cantalupo - 02-04-2015 Nice, thanks.
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - Me.B - 02-04-2015 This is a trick for subdomains but I think in next release we would set a new way for SSL & such tricks instead of supporting those hacks. Let's see... M B RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 02-04-2015 We will see in the future, but for now this works
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - karlis - 02-16-2015 (02-03-2015, 11:13 PM)Diablo925 Wrote: On LinuxAny idea why am i getting internal server error after doing this? RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 02-16-2015 Code: ServerAlias webmail.*Code: Alias /webmail /etc/sentora/panel/etc/apps/webmailThis 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
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - karlis - 02-16-2015 (02-16-2015, 04:03 AM)TGates Wrote:Tried it and it gives me a blank page. Any idea why? RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 02-16-2015 hmmm. Try accessing it by using your panel login URL (panel.domain.com)/etc/apps/webmail/ If that works, then it could be a .htaccess lockdown. @[Me.B] is more familiar with what they did to lock things down and could advise better
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - Me.B - 02-16-2015 Blank page === > PHP ERROR check logs for that. |