Posts: 5
Threads: 2
Joined: Apr 2016
Reputation:
0
Sex: Undisclosed
Thanks: 2
Given 0 thank(s) in 0 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
04-07-2016, 04:54 AM
(This post was last modified: 04-13-2016, 11:41 PM by Mazerunner04.
Edit Reason: typo and code fix
)
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>
Posts: 3
Threads: 0
Joined: May 2016
Reputation:
-2
Sex: Male
Thanks: 0
Given 0 thank(s) in 0 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
05-07-2016, 12:23 PM
nice, works on my server. thanks
Posts: 4 ,002
Threads: 193
Joined: Jul 2014
Reputation:
83
Sex: Undisclosed
Thanks: 72
Given 435 thank(s) in 395 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
05-10-2016, 02:41 AM
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
Posts: 5
Threads: 0
Joined: Mar 2017
Reputation:
0
Sex: Male
Thanks: 0
Given 0 thank(s) in 0 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-03-2017, 03:56 AM
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
Posts: 3 ,663
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-03-2017, 07:03 AM
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
Posts: 5
Threads: 0
Joined: Mar 2017
Reputation:
0
Sex: Male
Thanks: 0
Given 0 thank(s) in 0 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-03-2017, 07:53 AM
(This post was last modified: 03-03-2017, 11:28 PM by ddlxl.)
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)
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/"
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
Posts: 3 ,663
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-04-2017, 05:41 AM
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/"
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
Posts: 5
Threads: 0
Joined: Mar 2017
Reputation:
0
Sex: Male
Thanks: 0
Given 0 thank(s) in 0 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-04-2017, 07:53 AM
(This post was last modified: 03-04-2017, 07:56 AM by ddlxl.)
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
Posts: 3 ,663
Threads: 241
Joined: May 2014
Reputation:
85
Sex: Male
Thanks: 408
Given 599 thank(s) in 464 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-04-2017, 12:20 PM
No, you did not follow it step-by-step or it would work
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
Posts: 5
Threads: 0
Joined: Mar 2017
Reputation:
0
Sex: Male
Thanks: 0
Given 0 thank(s) in 0 post(s)
RE: Using Custom Vhost Entries for Webmail, MySQL, Etc.
03-04-2017, 10:29 PM
(This post was last modified: 03-05-2017, 01:37 AM by ddlxl.)
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
|