Help - Search - Members - Calendar
Full Version: Accessing domain directories prior to domain transfer?
The Planet Forums > Control Panels > Plesk
nmarus
Got a quick question. I am looking to have a directory under my main server name that points to my customer domain directory?

Something that give them access to their site prior to transfering their domain over.

ie:

http://mywebserver.com/home/mycustomerdomain

Any way to do this on the default Rackshack RH9/Plesk6 servers?
zippy6
You can do it using a symbolic link...

ln -s /home/httpd/vhosts/TheirDomain.com/httpdocs/ /home/httpd/vhosts/mywebserver.com/httpdocs/home/TheirDomain

I think that is the correct syntax. rolleyes.gif
4PSA
You must have FollowSimLinks enabled for this to work in httpd.conf.
nmarus
I was hoping that there was some apache (or other) config I could adjust to do this automatically verses manually for each domain.
Squire
Well, it's not perfect but... Here's what I did and it's at least serviceable.

I set up a sub-domain of preview.maindomain.com. Then I created vhost.conf file for this sub-domain and stuck the following in it:

[php]
AliasMatch ^/([^/]+)(/(.*))? /home/httpd/vhosts/$1/httpdocs/$3
[/php]

Restart Apache and then you can kinda-sorta preview the new domain by pointing your browser to http://preview.maindomain.com/otherdomain.com

The problems with this quickie method? Scripts won't work for the most part (permission issues). Any relative links will not appear, this means for images, external js files, php includes, etc. Absolute references are a must.

Far from perfect, but for plain old html sites it's at least workable.

Squire
root_loggins
Tried all the solutions but the one I find the easiest and works well without modifying the servers config is putting a temporary line in your computers hosts file.

Just remember to delete it after propogation.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.