• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

vhost.conf www prefix

E

edvxpert

Guest
Hi,

I want to access the webmail by www.webmail.domain.com, too. What changes are needed?
And how can I setup subdomains that are pointing to external domains?

Thanks in advance!

Christian
 
This can be done with a rewrite rule only, not with an alias because the webmail directives are not written in the per domain httpd.include files.
 
Hi,

I have created a vhost.conf with the following content:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap lowercase int:tolower
ServerAlias www.webmail.xyz.com
RewriteCond %{HTTP_HOST} ^www\.webmail\.xyz\.com$
RewriteRule ^/(.*) http://webmail.xyz.com/$1 [L,R]
</IfModule>

But it doesn't work....

Christian
 
The following has been tested to work to redirect 'www.webmail.domain.com' to 'webmail.domain.com'. Add the following to the domain's vhost.conf file (if you don't have one, then create one in /home/httpd/vhosts/domain.com/conf)

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap lowercase int:tolower
ServerAlias www.webmail.yourdomain.com
RewriteCond %{HTTP_HOST} ^www.webmail.yourdomain.com$
RewriteRule ^/(.*) http://webmail.yourdomain.com/$1 [R,L]
</IfModule>


I did have to clear the browser cache, and I believe I had to add a DNS record (one or other of the following):
Can be either a CNAME or A record.

www.sub.domain.com. CNAME sub.domain.com.

www.sub.domain.com. A xx.yy.zz.nn

[Edited: to add additional details and to be more clear on location of file]
 
Thank you.

the acctual job of rewrite is to change the url the user sees on the browser right ?
 
It doesn't work! I am redirected to the default plesk page... it seems, that plesk doesn't use the users vhost.conf.
 
Originally posted by edvxpert
It doesn't work! I am redirected to the default plesk page... it seems, that plesk doesn't use the users vhost.conf.

when u create a vhost file u have to run a commmand to make apache actual ¨read¨ the vhost file.
did u do that?
 
For security reasons, only root can create the vhost.conf and vhost_ssl.conf files.

For the changes to take effect, you need to run the following:

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=<domain_name>
 
I've tried it but it is still the same situation. :-(

In the logfile httpsd_error.log there is apache 1.3.33 started. Is this correct? I think apache2 is installed...
 
Strange i think plesk 7.5.3 uses apache 2 for his users....
 
First, what is your OS?

Next, from a SSH prompt, do:

rpm -q httpd

and see if you have Apache2 installed, should show something like:

httpd-2.0.40-21.17.legacy

(may not be the exact version) Post your results here.
 
Hi,

debian 3.1 sarge is installed on the system.

edvxpert:~# dpkg -s apache2
Package: apache2
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 61
Maintainer: Debian Apache Maintainers <[email protected]>
Architecture: i386
Version: 2.0.54-4
Depends: apache2-mpm-worker (= 2.0.54-4) | apache2-mpm-prefork (= 2.0.54-4) | apache2-mpm-perchild (= 2.0.54-4)
Description: next generation, scalable, extendable web server
Apache v2 is the next generation of the omnipresent Apache web server. This
version - a total rewrite - introduces many new improvements, such as
threading, a new API, IPv6 support, request/response filtering, and more.

Apache2 is up and running, it seems that Apache 1.3 is used for Plesk Web-Configuration...
 
Back
Top