Server alias without rewrite

Discussion in 'Installation/Configuration' started by andron26, Oct 6, 2009.

  1. andron26

    andron26 New Member

    Hello,

    ISPC 2.2.33 on OpenSUSE 10.2.
    There is domain www.aaa.com. I've created co-domain (server alias) www.bbb.com. Now www.bbb.com point to www.aaa.com context but rewrites domain to www.aaa.com. How to do this without rewriting?

    Config:

    <VirtualHost 1.1.1.1:80>
    ServerName www.aaa.com:80
    ServerAdmin [email protected]
    DocumentRoot /srv/www/webaaa/web
    ServerAlias aaa.com bbb.com www.bbb.com
    Alias /stats "/srv/www/webaaa/web/webalizer"
    Alias /error/ "/srv/www/webaaa/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html ErrorDocument 401 /error/authorizationRequired.html ErrorDocument 403 /error/forbidden.html ErrorDocument 404 /error/fileNotFound.html ErrorDocument 405 /error/methodNotAllowed.html ErrorDocument 500 /error/internalServerError.html ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /srv/www/webaaa/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/webaaa/user/$1/web/$3 <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>

    TIA
     
    Last edited: Oct 6, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just add the domain as co-domain and do not activate rewriting. The vhost above does not rewrite the domain, so the domain name does not change in the browser.
     

Share This Page