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.

Using Custom Vhost Entries for Webmail, MySQL, Etc.
#80
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
(04-17-2020, 11:45 PM)iraqiboy90 Wrote: Hi
Is this still a possibility?

I used the following code to lock it down with a wildcard certificate I already use for the main domain, which works fine, visually. I also changed it to 443 on the first part and added an http to https redirect with the last part. Is there anything behind that scene about security this might affect?
Code:
</VirtualHost>
# Configuration for WebMail
<VirtualHost *:443>
ServerName webmail.somedomain.com
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>
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/somedomain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/somedomain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/somedomain.com/chain.pem
# Keeping bellow for future upgrades.
# Requires Apache >= 2.4
SSLCompression off
</VirtualHost>

<virtualhost *:80>
ServerName webmail.somedomain.com
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

Does adding this solves the issue?

Code:
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
Also, do I need this?
Code:
php_admin_value open_basedir /var/sentora/temp/:/etc/sentora/panel/etc/apps/webmail:/var/sentora/logs/roundcube
 
The code you added 
Quote:php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
 
fixes the security issue above for custom vhosts.

Adding Open_basedir to webmail you will need to change the logs dir from /var/sentora/logs/roundcube to /etc/sentora/panel/etc/webmail/logs in roundcube config because open_basedir will lock you in the vhost directory. Other than that you should be good.
-Jettaman-

NEW: Sentora v.2.0.1 has been released!!!

Sentora's quick recovery depends on community support and donations. We need to stand as one and help Sentora into the future.

Donate HERE and do your part. We thank you for your support.
Reply
Thanks given by:


Messages In This Thread
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - by Jettaman - 04-18-2020, 04:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
SSL and Custom Vhost Entries for Webmail etienne7702 5 15 ,830 03-08-2018, 09:54 PM
Last Post: etienne7702
How to overwrite default admin. vhost? NIicK 1 7 ,038 03-27-2016, 01:16 AM
Last Post: Me.B
Roundcube Webmail https path pthalmann 0 4 ,892 12-29-2014, 09:09 AM
Last Post: pthalmann

Forum Jump:


Users browsing this thread: 15 Guest(s)