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.
#41
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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>
Reply
Thanks given by:
#42
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
nice, works on my server. thanks
Reply
Thanks given by:
#43
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

10$ free to start your VPS
Reply
Thanks given by:
#44
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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
Reply
Thanks given by:
#45
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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?
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#46
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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
Reply
Thanks given by:
#47
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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)
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#48
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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
Reply
Thanks given by:
#49
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#50
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
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
Reply
Thanks given by:


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

Forum Jump:


Users browsing this thread: 2 Guest(s)