Networking Forums

Networking Forums > Computer Networking > Linux Networking > Apache configuration to allow unlimited subdomains

Reply
Thread Tools Display Modes

Apache configuration to allow unlimited subdomains

 
 
rovisoft
Guest
Posts: n/a

 
      04-08-2005, 10:56 AM
Hello there to all, here is what i am trying to achieve:

-i need an apache configuration rule that will allow me to have
unlimited subdomains under a given domain, but i need this to be one
general configuration so i don't have to set all subdomains, my quess
is something related to VirtualHost!

-example will be something like this: when i type
42490853405.domain.com it will redirect(by using mod re-write) me to
a certain file(or folrder) on the domain.com where i will take the
subdomain name and with that i will make a certain query!

I have tried this config but no luck, maybe you can find the problem:

<VirtualHost *>
ServerName domain.net
ServerAlias www.domain.net *.domain.net
# et cetera
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.domain\.net$ [NC]
RewriteCond %2 !^www$ [NC]
RewriteRule ^.*$ /%2%{REQUEST_URI} [L]


</VirtualHost>

Thank you in advance for taking your time to read this post,
Regards,ovidiu


-----------------------------------
http://www.DevPlug.com -- Connecting Developers
 
Reply With Quote
 
 
 
 
Davide Bianchi
Guest
Posts: n/a

 
      04-08-2005, 01:23 PM
On 2005-04-08, rovisoft <(E-Mail Removed)> wrote:
> general configuration so i don't have to set all subdomains, my quess
> is something related to VirtualHost!


Read the documentation about Mass-Defined Virtual Hosts.
Davide

--
Every time I think that perhaps we are an advanced race, I turn around and
read ramblings on Slashdot, and realize I was wrong.
-- From a Slashdot.org post
 
Reply With Quote
 
rovisoft
Guest
Posts: n/a

 
      04-08-2005, 08:05 PM
Thanks, that's the clue i needed!

Ovidiu


-----------------------------------
http://www.DevPlug.com -- Connecting Developers
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Skys "Unlimited" Broadband Really Unlimited ? Simon Broadband 5 01-17-2011 08:26 PM
port forwarding 2 subdomains & 2 different IPs Daniel Linux Networking 3 12-14-2004 02:28 AM
subdomains and IP addresses Will Linux Networking 2 10-03-2004 04:22 PM
Proftpd + Apache: a question on ftp access configuration fil Linux Networking 0 12-18-2003 10:26 AM
subdomains/one IP/local network basic networking question Jimmy Dean Linux Networking 1 11-22-2003 03:08 AM



1 2 3 4 5 6 7 8 9 10 11