Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dynamic subdomains in apache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Leachim
n00b
n00b


Joined: 25 Feb 2007
Posts: 66

PostPosted: Sun Apr 20, 2008 2:45 pm    Post subject: dynamic subdomains in apache Reply with quote

Hi all, I want to create a dynamic subdomains on my host.. But subdomains wount be in "public_html" directory.

My file structure:

Code:
/data/domain/
/data/domain/sub - subdomains
/data/domain/web - public_html


My virtual host configuration file:

Code:
<VirtualHost *:80>
        ServerName domain.tld
        ServerAlias www.domain.tld
        ServerAdmin info@domain.tld

        DocumentRoot "/data/web/domain.tld/web/"
        ScriptAlias /cgi-bin/ "/data/web/domain.tld/cgi-bin/"

        ErrorLog /data/web/domain.tld/logs/error_log
        TransferLog /data/web/domain.tld/logs/access_log

        <Directory "/data/web/*/web/">
                Options Indexes FollowSymLinks
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
        <Directory "/data/web/*/cgi-bin/">
                AllowOverride None
                Options None
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>


Example: Ill make a dir /data/domain.tld/sub/lol and subdomain will be http://lol.domain.tld

Ty :)
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Sun Apr 20, 2008 3:55 pm    Post subject: Reply with quote

google says "look here"
Try google sometime, it is a website that can help you find things. :wink:
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Leachim
n00b
n00b


Joined: 25 Feb 2007
Posts: 66

PostPosted: Sun Apr 20, 2008 4:00 pm    Post subject: Reply with quote

I was looking for "dynamic subdomains"

and I didnt found this website. Ill try it.. Ty

//edit: This is not for what Im looking for.... I dont want subdomains in my docroot....

my docroot is /data/web/domain/web and I want subdomains in /data/web/domain/sub

//edit2: problem solved
Back to top
View user's profile Send private message
Erulabs
n00b
n00b


Joined: 08 Mar 2006
Posts: 48
Location: erulabs.com

PostPosted: Tue Apr 22, 2008 3:50 am    Post subject: Reply with quote

Its not going to be possible to have apache set up to "dynamically" create subdomains simply when you add a file...

You will probably need to write a function or something to do this for you...


reason 1: Apache needs to restart
reason 2: if a vhost dir doesnt exist, apache wont start.
_________________
No more things should be presumed to exist than are absolutely necessary. Or really cool.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum