Print Page | Close Window

2 hosts w/ one domain

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Web Design Discussion
Forum Description: Discussion on web design and development subjects.
URL: https://forums.webwiz.net/forum_posts.asp?TID=18946
Printed Date: 28 March 2026 at 6:02am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: 2 hosts w/ one domain
Posted By: mbenzp
Subject: 2 hosts w/ one domain
Date Posted: 26 March 2006 at 4:59am

My situation is tricky, i need 2 hosts to host files with one domain.. lets say

Lets say http://www.myforum.com - www.myforum.com (domain name and host) host my wwf and my homepage and all that. The hosting company offers a good deal but doesn't allow uploading of more than 200kb. I want to keep this company but now i need somewhere for my users to upload files to.
 
Now I go get a host that allows uploading. How can I have my users upload to my new host but still look like they're in http://www.myforums.com - www.myforums.com ?
 
How bout i even throw in a new domain name like http://www.myuploading.com - www.myuploading.com so my users can upload to that webspace but still appear in http://www.myforum.com - www.myforum.com .
 
In other words
users browse on http://www.myforums.com/uploads - www.myforums.com/uploads to upload and view uploaded files
-but-
the actual files reside on another host w/ the domain name http://www.myoploading.com/uploads - www.myoploading.com/uploads apearing to be at http://www.myforums.com/uploads - www.myforums.com/uploads
 
would this work on domain aliasing or what can i do to make this work? oh btw all the links are just examples, sorry if it doesn't make sense.



Replies:
Posted By: dpyers
Date Posted: 26 March 2006 at 5:13am
I do something like this fairly frequently to incorporate windows and unix servers within one domain.

Causes fewer problems is the 2nd site is a subdomain.

The dns zone records for the first site will have someting like *.example.com pointing to your ip address - the * means all sub domains. You need to create downloads.example.com on your other site - and on your frst site, add a dns A record for downloads.example.com that points to the ip address of the second site.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: mbenzp
Date Posted: 26 March 2006 at 6:03am

well i havn't bought the 2nd domain or webspace yet to upload, i just wanna do some research before i buy and know what options (if any) i have so i make sure i get them...

anyway is subdomaining like where on the ftp space u have a folder called /uploads but the website addy is http://www.uploads.mysite.com - www.uploads.mysite.com instead of http://www.mysite.com/uploads - www.mysite.com/uploads ?

on my first domain i have that option, but as far as the 2nd domain, i could check for that option or maybe later give u the name of the 2nd host i'm looking at.



Posted By: dpyers
Date Posted: 26 March 2006 at 9:20am
This article may be helpful
http://www.thirdsquare.com/how-to-host-a-subdomain-on-another-server-or-hosting-company-213 - http://www.thirdsquare.com/how-to-host-a-subdomain-on-another-server-or-hosting-company-213

If you use a different host for an ftp subdomain, I'd recommend going with a unix host that allows sub-ftp accounts. Most windoes hosts only allow at most a small number of ftp logins for a given account. With unix hosts, sub-ftp allows you to have many ftp accounts and assign a separate directory and login/password for each - gives you a lot more flexibility.

Don't forget to put a blank index.html page in each directory to prevent directoty listing.

Setting up mail for a subdomain on a different host than the main domain can be awkward - basically you need to add an mx record to the dns at the new host with a lower priority number that the one they automatically set up that will point back to your old mail server. It's easier to just do without mail for the subdomain.

To answer your other question - I use subdomains like blog.mysite.com or files.mysite.com on different machines from mysite.com quite often.
Anything before .mysite.com is a subdomain - e.g. www is a subdomain that by convention is routed to the same place as the domain - but it doesn't have to be. You'll see a lot of sites use www2 as a subdomain to route to a different machine. support.microsoft.com and msdn.microsoft.com are on different machines.

Subdomains have some advantages - basically, they are separate applications with their own cookies, server and application variables, and search engine indexing.

EDIT: - another useful link is at http://content.websitegear.com/article/subdomain_setup.htm - http://content.websitegear.com/article/subdomain_setup.htm


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: mbenzp
Date Posted: 26 March 2006 at 8:25pm
hey thanks for the articles and knowledge.. anyway when i get paid i will buy my 2nd host
but w/ the unix thing, i donno if i can use a ASP (like freeASPupload) upload component on a unix account... isn't asp only fully supported on a windows machine? or is the upload process replaced by FTPing into an account


Posted By: dpyers
Date Posted: 27 March 2006 at 2:33am
Kind of depends upon what you have in mind for who will up and download files and what size files you expect. Will your users upload, or will you do all the uploads and they just do downloads? If users upload, will their files need to go into a staging/verification area prior to being made available for download by other users?

IIS out-of-the-box is usually restricted to 2Mb files over http unless the limit is set up or down by the host. This is because http is a terrible file transfer medium - ftp is much faster and uses a lot fewer system resources.
There are a couple of asp upload components that can handle more than 2 Mb - e.g. AspUpload does 2 Gb, but they basically break the file transfer into parts and then re-assemble the parts. Some hosts don't support those components or still restrict the size of a file transfer because they break the spirit, if not the letter, of the law.

So...
The basic question to answer is who does the uploads.

IIS-HTTP:
If you want to do http file transfers from asp scripts run by either you or your users, check with your potential IIS host about file transfer size restrictions.

IIS-FTP:
IIS accounts come with an ftp login/password. This is for uploading and maintaining your site - not to be handed out to users. This is ok though if you are the only one uploading.
If your users will also upload, this leaves you with (depending upon what the host supports) either anonymous ftp or ftp sub accounts.  Anonymous ftp is a good way to get your site used as a warex/porn host. Sub-FTP will be usually 1-5 login/password accounts.

UNIX-FTP:
There's a lot of php, pearl, and other scripts out there that will allow you or your users to up/download using http without a size restriction. Ypou'll find that up/downloads through unix scripts run much faster than windows script components.

Anonymous ftp is easier to set up on unix to restict up/down or both types. Unix also usually allows almost unlimited sub-ftp accounts and you can script the creation of new ones instead of needing an IIS admin to set them up.

EDIT: IE Supports ftp:// urls as part of the standard install. FireFox requires an extension like FireFTP - which most users get anyway.


-------------

Lead me not into temptation... I know the short cut, follow me.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net