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. - Mazerunner04 - 04-07-2016

Hello,
so I've read the entire thread.. and tried the 2 versions of the vhost entries suggested here. But I still get the default page like henrique and imrane555 posted here aswell.
Any ideas how this is done in Ubuntu?

Edit2:

It ended up working with this, but I had to disable Suhosin and OpenBase.

Code:
# Configuration for WebMail  ServerName webmail.domain.xyz  DocumentRoot "/etc/sentora/panel/etc/apps/webmail/" 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"  AddType application/x-httpd-php .php  <Directory "/etc/sentora/panel/etc/apps/webmail/">  Options Indexes FollowSymLinks Includes ExecCGI Require all granted  </Directory>



RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - yoga.iswara - 05-07-2016

nice, works on my server. thanks


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - Me.B - 05-10-2016

This guide have a lot of insecure steps. Adding openbasedir to /etc/apps/webmail can be dangerous.

I don't advice this way.

M B


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - ddlxl - 03-03-2017

I'm sorry to bring this up.
I'm having trouble to make this to work.

I mean, I go to the apache module and edit the vhost I want. Run daemon and httpd restart. But the apache won't save the custom vhost entry.

I mean, it does save but it gets duplicated. The normal entry and the custom entry all there together. Souldn't sentora comment something or how it is supposed to work? If i edit the vhost manualy it will work.. but then deamon will reset the file.

best regards


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 03-03-2017

Custom vhost entries do not change the original vhost, it just allows you to add to the existing vhost. What is it you are trying to do?


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - ddlxl - 03-03-2017

Hello,

I'm trying to use the webmail.domain.com. when I use the custom fields it will never use the custom setttings unless I edit the vhost itself wich will be reset after daemon run.

like i said, the setting will be "duplicated" the original and the custom settings will appear in the vhost. either I comment the original or comment the custom settings it will work untill daemon run.

Best regards


EDIT:

here's how it shows at vhost file (and it works now.. I have no idea why either)


Code:
# DOMAIN: mail.domain.tld <virtualhost *:80> ServerName mail.domain.tld ServerAdmin admin@localhost DocumentRoot "/etc/sentora/panel/etc/apps/webmail/" -> (MANUALLY EDIT THIS AND IT STAYED AFTER DAEMON RUN) #php_admin_value open_basedir "/var/sentora/hostdata/USER/public_html/mail_domain_tld:/var/sentora/temp/" 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" ErrorLog "/var/sentora/logs/domains/USER/mail.domain.tld-error.log"  CustomLog "/var/sentora/logs/domains/USER/mail.domain.tld-access.log" combined CustomLog "/var/sentora/logs/domains/USER/mail.domain.tld-bandwidth.log" common <Directory "/etc/sentora/panel/etc/apps/webmail">   Options +FollowSymLinks -Indexes   AllowOverride All   Order Allow,Deny   Allow from all </Directory> AddType application/x-httpd-php .php3 .php DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm # Custom Global Settings (if any exist) # Custom VH settings (if any exist) </virtualHost> # Configuration for WebMail <VirtualHost *:80>     ServerAdmin mail@domain.tld     DocumentRoot "/etc/sentora/panel/etc/apps/webmail/"     #php_admin_value open_basedir "/etc/sentora/panel/etc/apps/webmail:/var/sentora/temp/"     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"     ServerName mail.domain.com     AddType application/x-httpd-php .php3 .php     <Directory />         Options FollowSymLinks Indexes         AllowOverride All         Order Allow,Deny         Allow from all     </Directory> </virtualhost> # END DOMAIN: mail.domain.tld



I'm even more confused now.. after daemon run it didnt change the document root of the original  conf. Open base dir have to be commented because apache will fail if turned on.

Best regards


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 03-04-2017

You can NOT use 'mail.domain.com' since this is reserved for your actual mail server connections! Delete it from sub domains.

You did not read the tutorial completely.

You do NOT create webmail.domain.com sub domain in the sub domain manager. (In your case mail.domain.com)
From tutorial:
Code:
(NOTE: Do NOT add these sub-domains in the sub-domain module!)


Your custom vhost entries are not correct:
Code:
</virtualHost> # Configuration for WebMail <VirtualHost *:80>    ServerAdmin mail@domain.tld    DocumentRoot "/etc/sentora/panel/etc/apps/webmail/"    #php_admin_value open_basedir "/etc/sentora/panel/etc/apps/webmail:/var/sentora/temp/"    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"    ServerName mail.domain.com    AddType application/x-httpd-php .php3 .php    <Directory />        Options FollowSymLinks Indexes        AllowOverride All        Order Allow,Deny        Allow from all    </Directory>
As per the tutorial, it should be:
Code:
</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 />        Options FollowSymLinks Indexes        AllowOverride All        Order Allow,Deny        Allow from all        </Directory>
Also in the tutorial:

Code:
You will also need to add them in your DNS registrar and in Sentora's DNS Manager module (add A records webmail.yoursite.tld)



RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - ddlxl - 03-04-2017

I followed the tut step by step. the domain are edited, so the user etc etc as you can see above.

I registered the dns and registar. like i said. it keeps duplicating the original and the custom.


PS: I have to create a sub domain so i can edit it in apache config right? I didnt get that step there.


Best regards


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - TGates - 03-04-2017

No, you did not follow it step-by-step or it would work Wink
You are adding your own 'ideas' which are not part of the process.

It states it right in the topic title: Using Custom Vhost Entries...
You DO NOT add a sub domain, you do it MANUALLY as a custom vhost entry.
To keep things 'tidy' you can enter it as a custom vhost entry under the domain you are making the sub domain for.


RE: Using Custom Vhost Entries for Webmail, MySQL, Etc. - ddlxl - 03-04-2017

I think I got it. I can use these custom entrys in any vhost then? since it wont override anything apache will just use them even if there are no sub domain for it?

I want to use. sbdomai.mysite.tld. if i edit the vhost entry of myseit.tld the custom entry will work either way?

Best regards