[Typo3] What is the best way to set up a multiple site with subdomains?

Gilles Deacur tronno22556 at gmail.com
Sun Dec 11 00:43:16 CET 2005


Gilles Deacur wrote:
> Michiel Roos wrote:
> 
>> Gilles,
>>
>> Here's what I think should be going on a working setup using multiple
>> domains in a single Typo3 install on a single IP address;
>>
>> - point as many names as you like to put.your.ip.here
>> - the domain names may also be c-names, doesn't matter as long as the
>> lowest name points to the webservers IP.
> 
> 
> What is a "c-name"?
> 
> All my domains point to my nameserver NS.examplenameserver.com and 
> NS2.examplenameserver.com
> 
> 
>> - The webserver should know what 'names' to listen to. I guess your
>> provider calls this 'sub domains' and that these are configurable via 
>> your
>> cpanel.
> 
> 
> I have a button called Addon Domains:
> 
> Current Addon Domains
> deacur.com (deacur)
> monkeywithatypewriter.com (monkeywithatypewriter)
> critterpal.com (critterpal)
> 
> (My DNS servers are listed as above.)
> 
> And one called Parked Domains:
> 
> Current Parked Domains
> sunshinelocksmiths.com
> sunshinelocksmithteam.com
> 
> (My DNS servers are listed as above.)
> 
> And one called Subdomains:
> 
> Current Sub-Domains
> monkeywithatypewriter.sunshinelocksmith.com (monkeywithatypewriter)
> critterpal.sunshinelocksmith.com (critterpal)
> admin-maint.sunshinelocksmith.com (admin-maint)
> deacur.sunshinelocksmith.com (deacur)
> 
> I don't think I'll need this option, but I can set up a redirect for a 
> folder (subdomain) to another URL.
> 
> I can also redirect a subdomain or an addon domain, but not a parked 
> domain.
> 
> 
>> - For simplicities sake I would start out without any redirection.
>> - For simplicities sake, disable realurl when setting up.
> 
> 
> This is how I started out, but okay, did this and still get the same 
> results.
> 
>>
>> If this is done All names e.g. *.critterpal.com and
>> *.sunshinelocksmith.com should point to your Typo3 root. This should mean
>> that you can access the backend via *.critterpal.com/typo3 or
>> *.sunshinelocksmith.com/typo3. You should in no case be locked out of the
>> backend.
>>
> 
> I of course get the Internal Server 500 error, because typo3 is 
> installed in a subdomain, not in the base of sunshinelocksmith.com. (And 
> because of the redirecting [or whatever the proper technical name is] 
> not working as it should at the moment.)
> 
>> I have several virtual domains configured seperate page trees in the 
>> typo3
>> root;
>>
>> GLOBE
>> |-+ www.critterpal.com
>> |-+ monkey.critterpal.com
>> \-+ whatever.sunshinelocksmith.com
> 
> 
> I only have critterpal.com written up at the moment.  I was just testing 
> typo3 on a small site before moving up to the big stuff.
> 
> GLOBE SunshineTeamNetwork
> |-+ CritterPal.com GotPet.net (pid=1)
> |--+ Home Page (shortcuts to above) (pid=12)
> |--+ Services & Rates (pid=5)
> |--+ Favorite Links (pid=6)
> |--+ etc.
> 
>>
>> I always use the main domain name for the name of the root page of every
>> page tree for clarity.
>>
>> Every page tree root-page may have several domain records.
>>
>> Your setup should now work. 
> 
> 
> Help. I'm still green to this.
> 
>>
>>
>> On Fri, 09 Dec 2005 09:37:09 -0500, Gilles Deacur wrote:
>>
>>
>>> When I type in www.critterpal.com, it actually goes to 
>>> critterpal.sunshinelocksmith.com (or 
>>> sunshinelocksmith.com/critterpal, I'm not sure) but it displays as 
>>> www.critterpal.com because it's an addon domain.
>>
>>
>> When I type www.critterpal.com, I am redirected to
>> http://admin-maint.sunshinelocksmith.com/index.php?id=1
>>
>> I think this should not be happening the redirect is still in place?
> 
> 
> I just got rid of it.
> 
>>
>>
>>> www.sunshinelocksmith.com is my master domain, but I have Typo3 
>>> installed in a subdomain (or folder) called "admin-maint".  I did 
>>> this because I have an index.php file in the root of 
>>> sunshinelocksmith.com and installing Typo3 into my "master domain" 
>>> would knock my functioning site first page off-line.  So I put it in 
>>> a subdomain thinking it would work the same admin-wise not thinking 
>>> about the problems I'm having at the moment.
>>
>>
>> Ok, so the currently running sunshinelocksmith.com site is on the same
>> server. This is an interesting setup ;-).
> 
> 
> Well, yes.  This is why I didn't want to install Typo3 into the base.  I 
> have an already functioning index.php page and can't have the typo3 
> index.php there as well.
> 
>>
>> I have no idea how cpanel handles stuff behind the scenes. Does it do
>> rewriting of its own? Or does it create a separate vhost entry for every
>> subdomain? It feels like vhost.
> 
> 
> I don't know.  I'm new to cpanel.  About 2 months. I just switched 
> webhosts.
> 
>>
>> If it creates a separate vhost for every subdomain, then all your other
>> 'listening domains' should be listed as ServerAlias in that same vhost
>> entry. As I said in my first post.
>>
>> If you cannot do this through cpanel (create aliases for a certain
>> subdomain), please contact your hosting provider and explain your 
>> problem.
>> You need aliasing.
> 
> 
> I contacted them yesterday but didn't hear back yet.
> 
>>
>>
>>> I told cpanel to add critterpal.com as a subdomain.
>>>
>>> Should I then tell cpanel to remove the subdomain?
>>>
>>> I already have the DNS pointing to the nameserver of my shared IP 
>>> address. Do I keep the DNS pointing to the same nameservers?  I guess 
>>> there really isn't much of a choice.  That's the only setting my name 
>>> registrar gives me.
>>>
>>> However, I can modify another name www.gotpet.net and use that as the 
>>> domain "base" instead of critterpal.  I have a few extra settings to 
>>> play with on that registrar, including http redirect and frame 
>>> forward(yuck... no frames).
>>>
>>> Yeah, I already have a domain listed in the pageroot as follows 
>>> (secondary fields are on):
>>> Domain: www.critterpal.com
>>> Redirect to: {blank}
>>> Transfer parameters {blank}
>>> and:
>>> Domain: www.gotpet.net
>>> Redirect to: {blank}
>>> Transfer parameters {blank}
>>> These are in the root page.  I have "Home Page" shortcut to the root 
>>> page.
>>> That's good.  (I think.)
>>
>>
>> Yup, looks fine and dandy to me.
>>
>>
>>> Also, in my AutoParser template setup field I have all this crap:
>>> config.simulateStaticDocuments = 0
>>> config.baseURL = 1
>>> config.baseURL = http://admin-maint.sunshinelocksmith.com/
>>> config.tx_realurl_enable = 1
>>> config.prefixLocalAnchors = all
> 
> 
> Changed:
> 
> #config.simulateStaticDocuments = 0
> #config.baseURL = 1
> #config.baseURL = http://admin-maint.sunshinelocksmith.com/
> config.tx_realurl_enable = 0
> #config.prefixLocalAnchors = all
> 
>>> # Configuring the Auto-Parser:
>>> plugin.tx_automaketemplate_pi1 {
>>>     # Read the template file:
>>>   content = FILE
>>>   content.file = fileadmin/critterpal/template.htm
>>>     # Here we define which elements in the HTML that
>>>     # should be wrapped in subpart-comments:
>>>   elements {
>>>     BODY.all = 1
>>>     BODY.all.subpartMarker = DOCUMENT_BODY
>>>     HEAD.all = 1
>>>     HEAD.all.subpartMarker = DOCUMENT_HEADER
>>>     HEAD.rmTagSections = title
>>>     TD.all = 1
>>>   }
>>>     # Prefix all relative paths with this value:
>>>  # relPathPrefix = http://www.critterpal.com/
>>> }
>>
>>
>> I see, I would leave realurl out for a start.
>>
>>
>>> (I've played with www.critterpal.com and other names for the baseURL but
>>> my css and images break, so this is working at the moment, but probably
>>> isn't correct.)
>>
>>
>>  
>>
>>> Notice the relPathPrefix as well.  This is currently commented out, but
>>> I was playing with this to see if I could get things working.  I've
>>> played with several varieties of the path.
>>>
>>> Hey, I REALLY appreciate you taking time out of your day to help me with
>>> this.  I really pored over the documentation and googled my fingers off
>>> to get this to go so I wouldn't need to bother anybody with this, but I
>>> was a day away from switching to phpwcms.  I really, really, really
>>> didn't want to go the "quitter" route.
>>
>>
>> I think it would be just as daunting to get this to work on a subdomain
>> using phpwcms.
>>
>> Do you consider it an option to 'move' your base sunshinelocksmith.com
>> site to a subdomain and install typo3 smack hard in the root? Provided
>> that you are positive that it would then still function properly?
> 
> 
> Yeah, that's the thing.  I'm not exactly ready to move it into the root, 
> because it'll knock my index page offline.  I'd have to spend a few days 
> just getting my homepage back up.  I will if that's the only step left 
> though.  (Or I could install a Typo3 into each subdomain, but that would 
> bloat my site very quickly.)
> 
>>
>> Cheers,
>>
>>
>> Michiel Roos
> 
> 
> Sorry for being so dense.  I'm not normally this dense (I think.)

I moved this to my root of the website and check all permissions, and 
when I try to log into the new location of typo3 admin, I get this error:

Warning: 
fopen(/home2/sunshine/public_html/typo3temp/llxml/misc.xml_058ff4fc51.default.iso-8859-1.cache): 
failed to open stream: Permission denied in 
/home2/sunshine/public_html/typo3/t3lib/class.t3lib_div.php on line 2117
ERROR: File not written to disk! Write permission error in filesystem?

I can't log into my admin in the new location anymore.

I can log into the admin on the old location, but the files will be 
unrelated.  The only constant between the new location and old location 
of my typo3 right now is the filenames and settings in the MySQL database.

I checked permissions and



More information about the TYPO3-english mailing list