![]() |
|
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) |
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 08-30-2017 If all sites are 403, apache server is running but you have a major error on the location of your sites or files. PM me your /etc/sentora/configs/apache/httpd-vhosts.conf file so I can see what is going on. RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - rpuig - 08-31-2017 (08-30-2017, 11:52 AM)TGates Wrote: If all sites are 403, apache server is running but you have a major error on the location of your sites or files. Thank you !! Yesterday a friend was able to fix the problem. Dont know what he did but i will post the answer here to help others. Still cant make it work with webmail.mydomain.com now i´m affraid to change things and dont be able to recover later... RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 09-01-2017 If you follow the tutorial it will work. You must also add a DNS entry for webmail so your server knows where to redirect it
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - rpuig - 09-02-2017 (09-01-2017, 05:11 AM)TGates Wrote: If you follow the tutorial it will work. You must also add a DNS entry for webmail so your server knows where to redirect it Finally, after a lot of failed attempts this is what worked for me : </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> All the domains was working with https (letsencrypt) and for now after adding this code in the virtual host override i´m able to access via webmail.anydomain.com Now just have to figure out how to do the same but with TLS using the existing letsencrypt certificates. Also related to this, i would appreciate some step by step help in order to create a cron job for auto renewal of all the letsencrypt certificates. Thanks !! RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 09-03-2017 About the certificates, you would have to make new ones for every webmail.domain.com. This is why I suggest using the alternative to this by setting it as domain.com/webmail. This way it will be covered by the domain's certificate (Which is how I have mine setup now.)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - rpuig - 09-03-2017 (09-03-2017, 09:22 AM)TGates Wrote: About the certificates, you would have to make new ones for every webmail.domain.com. This is why I suggest using the alternative to this by setting it as domain.com/webmail. This way it will be covered by the domain's certificate Great! i´ll try that and come back with the results ... Thanks! RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 09-04-2017 (09-03-2017, 12:35 PM)rpuig Wrote: Great! i´ll try that and come back with the results ... I think the only change is this: http://forums.sentora.org/showthread.php?tid=495&pid=6954#pid6954 RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - inkoop@topmatica.nl - 02-24-2018 I followed the settings in this forum and also the fora with this subject and also When I go to webmail.topmatica.nl it goes to the non-secure location. When i put the https:// in front of it I go to panel.topmatica.nl. The panel is secure , thats' ok. But I like to go the the secure webmail.topmatica.nl location. When I go to topmatica.nl/webmail I get a 403 access forbidden. Global vhost entry: Code: Alias /webmail /etc/sentora/panel/etc/apps/webmail/I don't see the the routing in my VHOST or configfile! Did I forget something? I deleted the <Virtualhost : 80 > in my VHOST override a long time ago made for webmail but it doesn't matter. My VHOST override for Topmatica.nl domain: Domain enable: On SuHosin : on Openbase : on Port override: 443 Forward port 80 to .. : On Ip override: nothing Custom entry: Code: SetEnvIf Request_URI "^/(Images/|Img).+$" nolog
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/letsencrypt/live/www.topmatica.nl/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.topmatica.nl/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.topmatica.nl/chain.pem
# Keeping bellow for future upgrades.
# Requires Apache >= 2.4
SSLCompression off
</VirtualHost>is there some config file I missed? What do I have to check? RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 02-24-2018 First thing I noticed is you added a closing </virtualhost>. Sentora will automatically add it when it re-writes the vhost information. Also, to use the alias method for every domain automatically, you need to add: Code: # Alias for MySQL login
Alias "/mysql" "/etc/sentora/panel/etc/apps/phpmyadmin"
<Directory "/etc/sentora/panel/etc/apps/phpmyadmin/">
php_admin_value open_basedir /etc/sentora/panel/etc/apps/phpmyadmin
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>
# 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>Save and wait for the httpd-vhosts.conf file to be re-written and for apache to reload (About 5 minutes). Then any domain or sub domain should be able to access your webmail or phpmyadmin by using domain.com/webmail or sub.domain.com/webmail and domain.com/mysql or sub.domain.com/mysql RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - inkoop@topmatica.nl - 03-23-2018 Tgates, Thanks, the domains are reacting with the Roundcube service on domain.nl/webmail/ and /mysql (is that a Volvo Ocean race sailboat )But Roundcube giving me a : "CONFIGURATION ERROR config.inc.php was not found. Please read the INSTALL instructions!" I will first check the if customer has e-mail configured in the panel. And My rerouting from onsecure to secure when http://panel.topmatica.nl is used is not working. I come to the old Joomla site which is offline. Despite the the Vhost override Secure website and panel is working and reacting on https://panel.topmatica.nl |