View previous topic :: View next topic |
Author |
Message |
Leachim n00b


Joined: 25 Feb 2007 Posts: 66
|
Posted: Sun Apr 20, 2008 2:45 pm Post subject: dynamic subdomains in apache |
|
|
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 |
|
 |
nixnut Bodhisattva


Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Sun Apr 20, 2008 3:55 pm Post subject: |
|
|
google says "look here"
Try google sometime, it is a website that can help you find things.  _________________ 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 |
|
 |
Leachim n00b


Joined: 25 Feb 2007 Posts: 66
|
Posted: Sun Apr 20, 2008 4:00 pm Post subject: |
|
|
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 |
|
 |
Erulabs n00b


Joined: 08 Mar 2006 Posts: 48 Location: erulabs.com
|
Posted: Tue Apr 22, 2008 3:50 am Post subject: |
|
|
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 |
|
 |
|