Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian ISP (http://www.linux-archive.org/debian-isp/)
-   -   Apache2, some variable with "domain name"? (http://www.linux-archive.org/debian-isp/354263-apache2-some-variable-domain-name.html)

Marc Aymerich 04-09-2010 09:38 AM

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

Serge van Ginderachter 04-09-2010 12:03 PM

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

Marc Aymerich 04-09-2010 02:47 PM

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


All times are GMT. The time now is 05:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.