Return-Path:
Delivered-To: apmail-httpd-users-archive@www.apache.org
Received: (qmail 94123 invoked from network); 22 Dec 2008 07:05:33 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2)
by minotaur.apache.org with SMTP; 22 Dec 2008 07:05:33 -0000
Received: (qmail 38106 invoked by uid 500); 22 Dec 2008 07:05:22 -0000
Delivered-To: apmail-httpd-users-archive@httpd.apache.org
Received: (qmail 38087 invoked by uid 500); 22 Dec 2008 07:05:21 -0000
Mailing-List: contact users-help@httpd.apache.org; run by ezmlm
Precedence: bulk
Reply-To: users@httpd.apache.org
list-help:
list-unsubscribe:
List-Post:
List-Id:
Delivered-To: mailing list users@httpd.apache.org
Received: (qmail 38078 invoked by uid 99); 22 Dec 2008 07:05:21 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Dec 2008 23:05:21 -0800
X-ASF-Spam-Status: No, hits=2.2 required=10.0
tests=HTML_MESSAGE,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: domain of ivan.ivanov.zanev@gmail.com
designates 209.85.219.23 as permitted sender)
Received: from [209.85.219.23] (HELO mail-ew0-f23.google.com) (209.85.219.23)
by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 07:05:10 +0000
Received: by ewy4 with SMTP id 4so981880ewy.0
for ; Sun, 21 Dec 2008 23:04:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:received:received:message-id:date:from:to
:subject:mime-version:content-type;
bh=nOPmAYD3LaHUgZlaA7LtgMSguZN99TGk6QVAzAG9lIs=;
b=flajKljpTNopYW3F2G/lD0C0eixPexTZ9Pfz8q4CPGRRmdyvB+lui6XfKw18RGOFBD
7oxaZy46ajV+bTnJqH+pNlKg/g6SvK8kBRhhVeJCDQQyHkZf4z4oVK5Qww80cL/hOkg9
1IMlqzPqbq3zq+AqM2skiVLiUF2XICcPb1B9M=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:mime-version:content-type;
b=aOPCealkeR58Dnz1WpNfsI7v2VxdY2WRS01ud93vsFrejLKgD2esOx1likro9siuHY
M75H3xvk8RiTOFSGUNCPZPlHIq8a99TLkcSWQz/AZZLMLvm8m44WZtnqx7rPVowwtbIC
YVtUTLCThb3ndKahxkRfNUTnLjLchxtfax6Kw=
Received: by 10.210.35.10 with SMTP id i10mr6273029ebi.94.1229929488855;
Sun, 21 Dec 2008 23:04:48 -0800 (PST)
Received: by 10.210.112.7 with HTTP; Sun, 21 Dec 2008 23:04:48 -0800 (PST)
Message-ID: <68929cf00812212304hcdcd92bn241bacfe7ba05ef2@mail.gmail.com>
Date: Mon, 22 Dec 2008 09:04:48 +0200
From: "Ivan Zanev"
To: users@httpd.apache.org
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_Part_78631_30698635.1229929488846"
X-Virus-Checked: Checked by ClamAV on apache.org
Subject: [users@httpd] Subdomains Hosting
------=_Part_78631_30698635.1229929488846
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Well, Hi!
I'm developing a Free Web Hosting Site. And I'm stuck, so pleease help, if
you can and if you want! :)
Every user will have the feature to add one or more subdomains to his
account. For example, if the site is called: thehost.com, a user might want
to create two subdomains: sub1 and sub2. So, he should be able to use the
File Manager to manage his created subdomains and see the results at
sub1.thehost.com and sub2.thehost.com. 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:
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.
Now, I don't like this, because if everytime we access sub1.thehost.com, we
make a select query, the mysql server (yes, i'm using mysql) will die in
pain for sure.
Solution 2: Don't give the users feature to add subdomains, but when a user
is created, we created a subdomain called superman.thehost.com. Now, this
will work fine, because we only need the 'superman' subdomain name to find
out where is our 'superman' subdomain path. This solution I would not like
to use.
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.
Thank you in advance...
------=_Part_78631_30698635.1229929488846
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Well, Hi! I'm developing a Free Web Hosting Site. And I'm stuck, so pleease help, if you can and if you want! :)
Every
user will have the feature to add one or more subdomains to his
account. For example, if the site is called: thehost.com, a user might
want to create two subdomains: sub1 and sub2. So, he should be able to
use the File Manager to manage his created subdomains and see the
results at sub1.thehost.com and sub2.thehost.com. 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:
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.
Now, I don't like this, because if everytime we access
sub1.thehost.com, we make a select query, the mysql server (yes, i'm
using mysql) will die in pain for sure.
Solution
2: Don't give the users feature to add subdomains, but when a user is
created, we created a subdomain called superman.thehost.com. Now, this
will work fine, because we only need the 'superman' subdomain name to
find out where is our 'superman' subdomain path. This solution I would
not like to use.
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.
Thank you in advance...
------=_Part_78631_30698635.1229929488846--