httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <carn...@electrichendrix.com>
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, http://helpdesk.teknerds.net.
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>
    ServerAdmin administrator@teknerds.net
    ServerName teknerds.net
    ServerAlias *.teknerds.net

    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
    
    </Directory>

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message