httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <>
Subject [users@httpd] Subdomain rewrite
Date Thu, 22 Mar 2012 00:09:41 GMT
Apache 2.2.12 on SLES11 SP2. I am trying to get a subdomain working via a rewrite rule,
The rule is in its own vhost (helpdesk.teknerds.conf. I am confused if it needs its own vhost
or if the rewrite should go in teknerds.conf vhost) and follows:
<VirtualHost *:80>
    ServerAlias *

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^(www|m|secure|admin).* [NC]
    RewriteCond %{HTTP_HOST} ^([^\.]+)\.teknerds\.net
    RewriteCond /opt/otrs/bin/cgi-bin/%1 -d
    RewriteRule ^(.*) /%1/$1 [L]

    DocumentRoot /opt/otrs/bin/cgi-bin/

<Directory "/opt/otrs/bin/cgi-bin/">    
	# Controls who can get stuff from this server.
	AllowOverride FileInfo AuthConfig Limit Indexes
	Options Indexes ExecCGI FollowSymLinks
	Order allow,deny
	Allow from all

The behavior that is happening is a listing of the site and it takes over all sites. So when
you goto, it lists the files in the doc root. If you goto
it is the same listing as above. I expect to be its own site and all
other sites to be there own.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message