Re: Subdomains Hosting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/12/22 Ivan Zanev <ivan.ivanov.zanev@xxxxxxxxx>:
> Now, in my File System I would like
> to structure the directories in the following way:
>
> users/Superman/sub1/
> users/Superman/sub2/
>
> Where Superman is our username (He added the two subdomains noted above).
>
> The problem: How to do this? I've read much about the htaccess files and I
> found several solutions:

Don't use .htaccess files, if you have access to the server config.

> Solution 1: To Write a perl program, which connects to the database, and
> selects path for a given virtualhost. The RewriteMap of the htaccess will
> execute the perl program and for the subdomain sub1, it will SELECT vpath
> FROM vhosts WHERE vname = "sub1". It will return: users/Superman/sub1/. The
> htaccess will substitute and everything works fine.

Use the map type dbd or fastdbd to perform a SQL query, the later one
will cache the results but you've to restart httpd in order to perform
a db look-up against the latest db.

> Please, If you know how to deal with this problem, tell me. I've pointed out
> two solutions, but if you know a third one....better one, please let me now.

You can extend solution 2 by using sub.superman.example.com. Another
way to do that on-the-fly without db look-ups is changing the path to
users/sub1/ .

Bob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux