• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Domain setup for testing purposes

G

gucisanyi

Guest
I've set up a testdomain, with the name testdomain in Plesk. This is not an registered domain and i want to use it for testing my scripts in the same environment they will run.
I made in plesk a domain with the name testdomain, but i have no idea, how to reach it.
I've tried the url from my main-domain and then /testdomain, the user name from the testdomain, but nothing works.
Over ftp i have no problem to access it.
 
You'll need to setup DNS to resolve it or you can use the ip address of the server /testdomain

something like this ....

http://205.158.222.17/testdomain

There is a preview button in the control panel that lets you view a site before the DNS updates are completed. This is how it refers to the domain for viewing purposes. I would have to go look for the exact URL it uses.
 
Normally for virtual host you would enter http://ipaddress/~username/ but that will not work in Plesk since they do it differently..

So the easiest way is to edit your own hosts file on the computer you want to *VIEW* the site from .. Not the server's hosts file ..

So let say you have Windows XP you want to use to view the website your working on .. hosts file are normally found in

C:\Windows\System32\drivers\etc\hosts

Open hosts with notepad .. and at the bottom you will prolly see this already
127.0.0.1 localhost

so under it add two more lines to it

66.235.201.19 testdomain.com
66.235.201.19 www.testdomain.com



then save the hosts and open your web browser then enter www.testdomain.com and your website will appear like the real thing .. you must add above line to every computer hosts file you want to view the website from .. **NOT THE WEBSITE SERVER OR PLESK SERVER HOST FILE** just the user end computer you are going to view the site from ..


I checked your testdomain site and there seem to be an error with your php script or install .. look like you got the path wrong when installing it ..


Bill
 
Thanks CBill, that's work.

Memdy, i have to insrt two times the ip adress from the server?

he said document not found.

Thanks again
 
You could use ip but it will not always be 100% fully function since lots of php or scripts depend on full doman path to function and does not regonzine an numbic ip as a path ..

Editing local hosts file and testing it on a server with a fake domain name or a domain name that is not updated via name server yet is the best way to go when testing website before going public with it ..

I do that all the time and never once had an issue with this method ..

In fact if you are already running an site with a domain name and you are moving to a new server .. you can actually edit your hosts file with the new server ip and your exisiting domainname to make sure everything works before updating your name server to the new server ip address .. Local hosts will override your ISP DNS entry for any domain you put in there ..

Bill
 
Thanks a lot,

I'll make this way.

Currently I have enourmous problems, that my scripts runs on my localhost perfectly, and at the moment I upload them, nothing works.

I think this way i can set up the same environement for testing like the live system.

Thanks again for all who answered

Sanyi
 
Has anyone found a satisfactory answer to this question? I've got the same needs, in needing to develop a client's domain before the site goes live, but being able to preview it thru a standard URL.

I asked my web host (mt) Media Temple if they knew how I could accomplish this, and their suggestion was to make different sites the master on the IP Address, so you would be able to see the content for testing.

This would work if the whole box was used nothing for development of a single site, but imagine if you're simultaneously developing a dozen client's sites. How could they all visit their sites if I had to juggle between which one was the master ? I've even tried Memdy's way of accessing each domain's content by http://ipaddress/ipaddress/domain.com/ but didn't have any luck.

Does anybody know of a way to view a domain for testing purposes with Plesk ? I need to be able to view multiple client domains without having to switch each one to be the master. Requiring a client to modify his/her HOSTS file just to view their test domain is ridiculous.
 
Originally posted by gucisanyi
Thanks CBill, that's work.

Memdy, i have to insrt two times the ip adress from the server?

he said document not found.

Thanks again

Only reason I can think of is because the first address is the server and the second address is the IP the site is configured to listen to (if you had more than one on the server) since you are circumventing the DNS. Since the domain isn't real on the internet, it won't know to parse that. Just me thinking out loud. :D
 
You could always set up a real working live domain then set up a sub domain for each client "testing" purpose or review purpose.

Bill










Originally posted by ryanjbonnell
Has anyone found a satisfactory answer to this question? I've got the same needs, in needing to develop a client's domain before the site goes live, but being able to preview it thru a standard URL.

I asked my web host (mt) Media Temple if they knew how I could accomplish this, and their suggestion was to make different sites the master on the IP Address, so you would be able to see the content for testing.

This would work if the whole box was used nothing for development of a single site, but imagine if you're simultaneously developing a dozen client's sites. How could they all visit their sites if I had to juggle between which one was the master ? I've even tried Memdy's way of accessing each domain's content by http://ipaddress/ipaddress/domain.com/ but didn't have any luck.

Does anybody know of a way to view a domain for testing purposes with Plesk ? I need to be able to view multiple client domains without having to switch each one to be the master. Requiring a client to modify his/her HOSTS file just to view their test domain is ridiculous.
 
I too need to preview the sites before DNS resolves as most sites I work on are replacements for exisiting sites. I can preview static html before DNS resolves using ip-address\ipaddress\site.com, but I cannot set a cookie to authenticate a user. I set up content management systems and shopping carts, so this is a huge issue.

I can resolve the site if I set my brower to use my hosts ip address as a proxy server from work, but my ISP for my home account uses a transparent proxy server to save bandwidth charges, so it ignores my settings. Unfortunately I develop sites from home...

If I try to access the site by placing an entry in my Windows hosts file I end up at the current production site, not the new site.

Does anyone know how to preview a domain before DNS resolves on Plesk 7.1.6??? This seems like such a basic requirement for a web server.

Regards,
Ron
 
Same here. I was disappointed to discover this problem on Plesk 7.5.2 in the middle of a migration!
 
I have Plesk 7.5.2 and the Site Preview feature is disabled.
Tried the http://ipaddress/ipaddress/site.com/ solution but with no success. Can anyone help?
 
Try adding these lines to /usr/local/psa/admin/conf/httpsd.conf:
Code:
RewriteEngine on
RewriteCond %{REQUEST_URI} ^\/sitepreview\/(.{0,})$
RewriteRule ^\/sitepreview\/(.{0,})$ /sitepreview.php?$1 [L]
in the <VirtualHost _default_:8880> section.
 
I got ahead of myself saying I had version 7.5.2 I was actually upgrading that very moment and didn't think the site preview feature would come to life at the end of the upgrade process.

Site Preview now works... sort of... it only works for basic html/php files. Try previewing a Mambo Portal.

I suppose plesk offers no solution... big setback... I didn't want to look at other control panels... I was very happy until this....
 
I am having the same problems described here by many.

I was able to view my site before installing a php CMS using the following naming format:

http://myip/myip/domain.com

now that I have loaded up some data I can no longer test\demo the site.

My problem is that I currently have a website that is live at a shared hosting server and I am transferring it to a bigger\better dedicated server, but I would like to get things up and running and mirrored from the old site before pointing the DNS over.

Therefore I am looking for some help in displaying my site using the preview functions of PLESK.

Also, I came up with another idea that I am posing to these forums:

If I setup my site on another domain such as mydomain2.com and make sure everything works, then change the domain back to mydomain.com will everything work?

If that was confusing here is a better example:

1. mydomain.com <---live on the net right now

2. mydomain2.com <---will make live and run\test all my functions of my other website

3. change mydomain2.com (in plesk) to mydomain.com and then wait for the DNS transfer to happen.

This is the only possible work-around I could come up with, but if someone has any advice I would deeply appreciate it.
 
i dont know about you guys but i use the host file trick in windows XP and it works fine and if you dont want to take the pain you can goto you network setting and put your domain's IP in the name server and it will work that way too.
 
Back
Top