temp adress for addon domains

nappa

Verified User
Joined
Jun 10, 2003
Messages
32
What is the address for domains that are added on ? I know that the main user address is http://I.P/~username, but I would like to know what the other addresses are.

If there is not one, can you tell me how I can make some ? Thanks :)
 
Right now you can only preview one domain (the main domain) before DNS propagation. :)

Mark
 
I am an admin, so I can edit the apache conf. So maybe this shoudl be moved to the admin forum ?
 
nappa said:
is it possible to manually add entires into apache to show the site at also : http://IP/~username/domain.com ? Even if it is a jury rigged solution for now, I would like to do this for one person.

NAPPA

For a temp solution at shell:

ln -s /home/username/domains/parkeddomain.com/public_html /home/username/public_html/domain.com

That should make it viewable as you wish...
 
The Prohacker said:
For a temp solution at shell:

ln -s /home/username/domains/parkeddomain.com/public_html /home/username/public_html/domain.com

That should make it viewable as you wish...
Yeah, I had to do that a while back too. It works.

Or actually, I used this:

ln -s /home/username/domains/parkeddomain.com/public_html /home/username/public_html

(DirectAdmin uses the symbolic public_html link in your home directory to route http://IP/~username/ requests.)
 
If you want to change ~username to ~username/domain.com

you can simply remove the public_html symbolic link, create a public_html directory in its place, then create symbolic links as domain.com pointing to where ever you want.

cd /home/username
rm public_html
mkdir public_html
cd public_html
ln -s ../domains/domain.com/public_html domain.com
ln -s ../domains/otherdomain.com/public_html otherdomain.com

John
 
Thanks everyone :) I've done the very first method on this thread. Is it possible to request this be made automatic ?
 
Is there any update on the possiblity of making this automatic? Or having some method of previewing all domains in a user's account before propagation?
 
you can simply remove the public_html symbolic link, create a public_html directory in its place, then create symbolic links as domain.com pointing to where ever you want.

cd /home/username
rm public_html
mkdir public_html
cd public_html
ln -s ../domains/domain.com/public_html domain.com
ln -s ../domains/otherdomain.com/public_html otherdomain.com
I like this, John. Care to make it automatic and default :)?

Jeff
 
I'm going to add it to the versions system for the next release after this one coming up, although I haven't considered any issues that may arise from it, but I'll see what I can do when I get to it.

John
 
You could do this automatically whenever you setup and delete new domains by using the domain_create_post.sh and domain_delete_post.sh scripts. You'd have a couple of options if you'd decide to go this route.
 
I got a much easier way... Especially if you need to do it for only one (or a few) people.

Simply add the domainname to the workstations hosts file that points to the server. As soon as the webserver is serving the new virtual domain you'll be able to access it.

If you've got a few more users, you might want to setup a temporary forwarding zone in your company's DNS server that forwards to your hosters DNS (which is probably the first DNS to know about the new zone). Once you can query your providers DNS (or root-servers) with NSLOOKUP you can delete the forward.

@switch: You can do that by adding the hosters DNS-server in the list of parents or forwarders of your current DNS server.
 
Hi guys,

So now we have two an extra public_html directory to deal with ?

/home/user/public_html/
/home/user/domains/xxxxxxx/public_html/

and they could actually hold different information ?

In other words, we have tons of tutorials that say "Your site ALWAYS IN public_html"

not public_html/domain.com (which would seem backwards if you confused it with the domain.com/public_html folder)

I'm glad we got rid of the sombolic link, and glad we are looking at different ways to solve the "preview more than one site" issue, but are we killing a monster and creating another one ?

(perhaps I didn't quite grasp this whole deal correctly)
 
Cyberneticos, the public_html shortcut, even as a link, would have problems with any ftp account where the user wasn't ftp'ing to his/her default domain.

As for us, we've always had our welcome emails, tutorials, etc., advise our clients to ftp to the public_directory at ~/domains/example.com/public_html (of course replacing example.com with the correct domain name).

That's always worked in the past and still works now.

Jeff
 
Hi Jeff,

Right, right. That's what we were talking about on the thread I start months ago. That's why I'm glad about this new move, since we do the exact same thing (give the whole path)

But what I meant in the previous post was that if you are a user and start navigating the route, you will find a public_html earlier than the one described in the tutorials (even though they finally see domain shortcuts, which is cool)

So what happens if they confuse the first public_html as the actual web-root ?

(just being picky, but also making sure we haven't ignored this scenario)

:p
 
Last edited:
If they do, then they end up uploading to the wrong directory. Of course it happens from time to time.

Without that public_html directory then there's no way to easily have a temporary address for domains before they resolve.

It's a usability tradeoff.

Jeff
 
Perhaps we should make the public_html that's used for IP urls a different name ?

Like /home/user/shortcuts ??
 
Back
Top