LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache 1.3.33 and subdomain (https://www.linuxquestions.org/questions/linux-software-2/apache-1-3-33-and-subdomain-343367/)

fai 07-15-2005 03:36 AM

Apache 1.3.33 and subdomain
 
Hi all
I am using Debian 3.1 with LAMP installed
Apache 1.3.33,PHP 4.3.11 and Mysql 4.1
And now i would like open it to my friends so that they can publish their homepage
And here is the question :
Some of my friends want to have their own web site with subdomain provided by simply adding a folder under public_html
for example :

domain = www.demo.com

when user create a directory named diary
then they can visit it by typing : diary.demo.com instead of www.demo.com/diary

Virtualhost config :
<VirtualHost *>
ServerName www.demo.com
DocumentRoot /home/demo/public_html/
</VirtualHost>

I know the subdomain can be config by hard-coded in httpd.conf
but seems it is not efficient and non-sense

I know this question had been asked by the someone here for many times
and i had search through the web for solution
I am not sure that if can be achieved by using the mod_rewrite in apache
but seems mod_rewrite only support apache 2.x,right?
And I want to keep using Apache 1.3.33 if possible

Hope it is not boring for your guys for this boring post
Hope i can get some hints from here
Hope...*
And thanks for everyone for reading it

phil.d.g 07-15-2005 03:49 AM

It can be done by mod_rewrite, the two documents that you need are:
http://httpd.apache.org/docs/mod/mod_rewrite.html
http://httpd.apache.org/docs/misc/rewriteguide.html


All times are GMT -5. The time now is 09:47 PM.