1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice

vhost.conf www prefix

Discussion in 'Plesk for Linux - 8.x and Older' started by edvxpert, Aug 1, 2005.

  1. edvxpert

    edvxpert Guest

    0
     
    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
     
  2. hardweb

    hardweb Guest

    0
     
    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.
     
  3. edvxpert

    edvxpert Guest

    0
     
    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
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    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]
     
  5. MaRiOs

    MaRiOs Guest

    0
     
    Where do u add this ? in the httpd.include? where???
     
  6. jamesyeeoc

    jamesyeeoc Guest

    0
     
    In the domain's vhost.conf file
     
  7. MaRiOs

    MaRiOs Guest

    0
     
    Thank you.

    the acctual job of rewrite is to change the url the user sees on the browser right ?
     
  8. edvxpert

    edvxpert Guest

    0
     
    It doesn't work! I am redirected to the default plesk page... it seems, that plesk doesn't use the users vhost.conf.
     
  9. MaRiOs

    MaRiOs Guest

    0
     
    when u create a vhost file u have to run a commmand to make apache actual ¨read¨ the vhost file.
    did u do that?
     
  10. MaRiOs

    MaRiOs Guest

    0
     
    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>
     
  11. edvxpert

    edvxpert Guest

    0
     
    No, what do I have to do?
     
  12. MaRiOs

    MaRiOs Guest

    0
     
    read my previous post :eek:)
     
  13. jamesyeeoc

    jamesyeeoc Guest

    0
     
    According to Plesk, you should do that command.
     
  14. edvxpert

    edvxpert Guest

    0
     
    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...
     
  15. MaRiOs

    MaRiOs Guest

    0
     
    Strange i think plesk 7.5.3 uses apache 2 for his users....
     
  16. edvxpert

    edvxpert Guest

    0
     
    What else can I do to tell plesk to use the vhost.conf?
     
  17. jamesyeeoc

    jamesyeeoc Guest

    0
     
    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.
     
  18. edvxpert

    edvxpert Guest

    0
     
    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 <debian-apache@lists.debian.org>
    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...
     
Loading...