Subdomain Cloning - DNS


#1

[22:06] I’m trying to get yellowshift.bluetoast.org to clone yellowshift.hlrse.net
[22:06] yellowshift IN CNAME yellowshift.hlrse.net. doesn’t cut it on bluetoast
[22:07] It brings up a ‘cPanel is working’ page from hlrse, rather than the contents of yellowshift.hlrse.net

[22:11] What I am trying to do
[22:12] is have yellowshift.bluetoast.org clone yellowshift.hlrse.net
[22:12] yellowshift.hlrse.net is an actual user-level cPanel account, obviously hosted on hlrse.net (so it isn’t just an ordinary subdomain)
[22:12] ok
[22:12] yellowshift IN CNAME yellowshift.hlrse.net. doesn’t quite cut it
[22:12] because as you can see… http://yellowshift.bluetoast.org/
[22:13] It brings up one of those ‘cPanel is working’ pages from hlrse, rather than the contents of yellowshift.hlrse.net
[22:13] :X
[22:13] I’m out of ideas
[22:13] I’ve posted on hardforums and webhostingtalk, but havent received help from there
[22:13] I’ve asked here in GS and the private SpexHost staff IRC, but haven’t got any luck there
[22:14] I don’t know ethier most likely the browser is telling Apache that they are coming from yellowshift.bluetoast.org… so it defaults to the setup page cause ther eis not Virtual Host in apache for it…
[22:14] >.<
[22:14] ok
[22:14] I’ll ask my host to see if he might have an idea… apache editting powers aren’t in my hands :stuck_out_tongue:
[22:14] It would be different if you had your ip for that host
[22:14] then you could… just use a A record
[22:14] mhm :
[22:15] but since its a shared host Apache does the heavy lifting… and decides which page you see…
[22:15] :
[22:15] Is it possible to somehow specify just for yellowshift?
[22:16] you could possible have the Hlrse host add virtual host to there apache for yellowshift.bluetoast.org
[22:16] and directo it to the yellowshift directory on there server
[22:16] hmm


#2

/home/user/yellowshift.bluetoast.org/index.php

<?php header( 'Location: http://yellowshift.hlrse.net/' ) ; ?>

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

I’ve not tried this. How does this behave? Is it equivalent to a Mirror, Cloak, or Redirect?

-Scott


#4

[quote]<?php
header( ‘Location: http://yellowshift.hlrse.net/’ ) ;
?>[/quote]

http://us3.php.net/manual/en/function.header.php

"The second special case is the “Location:” header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless some 3xx status code has already been set. "

And in case no one cares to look up the HTTP RFCs either…

“302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.”

:cool: openvein.org -//-


#5

Now I’ve actually tried it, and learned only a tiny bit.

It looks like it’s the same as a redirect, except a 302 means your original site still exists, but is temporarily elsewhere.

This does not clone the original site, as the URL changes. So if the user can’t get a CNAME to work, and since they can’t clone a non-DreamHost site, they’re stuck with a redirect of some sort.

-Scott


#6

Yeah, I think OP was wanting to cloak rather than clone.

Looking at the links it appears it’s an actual site rather than a CPanel frontend so a .htaccess 301 would be the way to go if it’s to remain permanently at the other host and not being moved here.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

bluetoast.org DNS entry:
yellowshift IN A 74.53.169.187

yellowshift.hlrse.net resolves to 74.53.169.187.
bluetoast.org resolves to 208.113.163.179.
espresso.dreamhost.com resolves to 208.113.170.9.

Source: http://httpd.apache.org/docs/1.3/mod/core.html#virtualhost
Source: http://httpd.apache.org/docs/1.3/vhosts/examples.html
Source: http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost
Source: http://httpd.apache.org/docs/2.2/vhosts/examples.html

[quote]NameVirtualHost 208.113.163.179
NameVirtualHost 208.113.170.9
DocumentRoot /public_html
ServerName yellowshift.bluetoast.org


Port 80
ServerName bluetoast.org
NameVirtualHost 208.113.163.179

<VirtualHost 208.113.163.179>
DocumentRoot /public_html
ServerName yellowshift.bluetoast.org

Port 80
ServerName espresso.dreamhost.com
NameVirtualHost 208.113.170.9

<VirtualHost 208.113.170.9>
DocumentRoot /public_html
ServerName yellowshift.bluetoast.org


Listen 208.113.163.179
Listen 208.113.170.9

Port 80
ServerName bluetoast.org
NameVirtualHost 208.113.163.179
ServerName espresso.dreamhost.com
NameVirtualHost 208.113.170.9

<VirtualHost 208.113.163.179 208.113.170.9>
DocumentRoot /public_html
ServerName yellowshift.bluetoast.org


<VirtualHost 208.113.163.179>
DocumentRoot /public_html
ServerName yellowshift.bluetoast.org


Ensure that Apache listens on port 80

Listen 80

Listen for virtual host requests on all IP addresses

NameVirtualHost 208.113.163.179:80

<VirtualHost 208.113.163.179:80>
DocumentRoot /www
ServerName yellowshift.bluetoast.org

-----------------------------------------------------------------[/quote]
All of those present 500 internal errors when I apply any of them to the .htaccess of yellowshift.hlrse.net.


#8

They will not work in per-directory context. They must be specified in the server configuration file instead.
:cool: openvein.org -//-