FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian ISP

 
 
LinkBack Thread Tools
 
Old 04-09-2010, 09:38 AM
Marc Aymerich
 
Default Apache2, some variable with "domain name"?

Hi all!
I have a virtualhost definition with a lot ServerAlias values. I want
to have a specific alias for any of this ServerAlias. Would be perfect
if apache2 stores the domain name in som variable in order to use it
to make a single AliasMatch instance for all ServerAlias.

Something like:

AliasMatch ^/webalizer /home/httpd/webalizer/$domain


Have Apache2 anything like $domain var?

Thanks!!

--
Marc


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: n2see5163b51004090238qd3758a4fp2d27233616adebf3@ma il.gmail.com">http://lists.debian.org/n2see5163b51004090238qd3758a4fp2d27233616adebf3@ma il.gmail.com
 
Old 04-09-2010, 12:03 PM
Serge van Ginderachter
 
Default Apache2, some variable with "domain name"?

On 9 April 2010 11:38, Marc Aymerich <glicerinu@gmail.com> wrote:


Something like:



AliasMatch ^/webalizer /home/httpd/webalizer/$domain





Have Apache2 anything like $domain var?
Maybe with this

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond


--

* * Met vriendelijke groet,

* * Serge van Ginderachter
 
Old 04-09-2010, 02:47 PM
Marc Aymerich
 
Default Apache2, some variable with "domain name"?

On Fri, Apr 9, 2010 at 2:03 PM, Serge van Ginderachter
<serge@vanginderachter.be> wrote:
>
>
> On 9 April 2010 11:38, Marc Aymerich <glicerinu@gmail.com> wrote:
>>
>> Something like:
>>
>> AliasMatch ^/webalizer /home/httpd/webalizer/$domain
>>
>>
>> Have Apache2 anything like $domain var?
>
> Maybe with this
>
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond
>

Thank you Serge !,

This is my solution:

RewriteRule ^/webalizer[/]*(.*)$ /home/httpd/webalizer/%{SERVER_NAME}/$1

--
Marc


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: l2jee5163b51004090747sd1595398q43a7cabd0ca787bd@ma il.gmail.com">http://lists.debian.org/l2jee5163b51004090747sd1595398q43a7cabd0ca787bd@ma il.gmail.com
 

Thread Tools




All times are GMT. The time now is 01:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org