Switching Cpanel site from using Domain to IP? - cpanel

I am switching our site from one server to another, but need to test its all working without changing the domain, how can I change it so it accepts connections to the IP?

You have tagged Cpanel so if it is Cpanel/WHM,it includes facility of temp URL which generally goes like http://IPaddress/~cpanelusername
This should load the webcontents of your "publichtml" of Cpanel account.
Please specify the details of your controlpanel on both servers if you are not referring to Cpanel-WHM.

I think you are trying to check your site from new server without changing domain nameserver.
To check our domain from new server, You need to update your local PC host file ( C:\Windows\System32\drivers\etc\hosts ) with new IP and your domain so that you can test your domain from new server.

Related

Can't access my website after trying to move it to another server

I want to move my website to my new virtual server that I bought from another service provider.
I installed Apache Webserver, created a virtuzal host for the website and I changed the DNS in my actual service provider's admin panel pointing to the new server's IP address.
I then realized that I can't access mysql to export my database and I disabled the domain on the new server, changed the DNS back in my old admin, but now I get a ERR_CONNECTION_REFUSED when I try to call the website.
I don't find anything on Google, because everybody wants me to delete browser cookies (which I did), but that doesn't help.
What can I do for getting back the old website and being able to export my MySQL database?
It may well be that your DNS records are still propagating and you need to wait. Try adding an entry in your hosts file to point to the "old" site URL and hit it in your browser. If it works then it's the DNS not completed propagating. Otherwise your error looks like an Apache issue not a MySQL issue.
I simply deleted the virtual host on the new server for the domain and I was able to access the "old" site immediately.
It's still possible, that the DNS just finished propagating, like #George said, but it's very unlikely.

Allow my users to point their subdomains to my server with CNAME, without having to use add-on domain in cpanel

So I have a service that allows my user to map their own subdomains to my server. For example
http://sub.userdomain.com will map to http://sub.mydomain.com
Now I know that the user must add a CNAME record that points to my subdomain, but using Apache & Cpanel, now I have to add an add-on domain for this connection to work.
Is there a workaround so that I don't have to set up this add-on domain for the connection to automatically connect? (Basically so that my user can point their CNAME to my subdomain and it then automagically works without me having to do manual input).
Hope that makes sense!
No, You need to add addon domain on your server so that cPanel will create entry in apache configuration to work that domain.

Domain Already Exists in the Apache configuration

I'm getting an error:
Account Creation Status: failed
(XID s9wshe) The domain "mydomain.com” already exists in the Apache configuration.
This site was originally on Server 1. These are the nameservers:
NS1.DOMAIN.COM
NS2.DOMAIN.COM
He bought a secondary server. These are the nameservers:
NS3.DOMAIN.COM
NS4.DOMAIN.COM
I'm trying to move sites from the 1st server to the new server. He has add-on domains and sub accounts inside individual accounts in the WHM.
This specific website was added on inside one of these accounts (instead of being given it's own account in WHM). I believe that is why I am having this issue.
My question is what is the best way to configure the new account on the secondary server without taking the old site down for anything other than the domain nameserver change?
Figure out which server is currently being used by the nameservers of the domain. It sounds like you may have the DNS tied between the servers. As long as the domain is pointed at the other server's nameservers you can simply delete the DNS zone on the server you are trying to create the account on and then you should be able to add it. Afterwards, simply create the DNS zone again.
In my case I had a GoDaddy shared hosting with multiple add-on domains, When I tried to delete an addon domain and recreate it again, I got this error (Domain already exists in the Apache configuration). I fixed it by going to the alias under the domain section in Cpanel. Then deleted the alias. Waited a bit, then try to do the steps again. It worked for me.

How to test SSL is set up and configured correctly on dev?

I am moving a site from one server to a new server. Currently the new server is the development site and is accessed via IP.
I have copied and set up the SSL on the new server but there doesn't seem to be anyway of testing that the SSL is properly installed until I point the domain.
Is there a way I can test that the SSL it setup and configured correctly before I point the domain?
Ideally I'd like to launch the site and know that everything is working correctly!
Thanks
You could try adding the new IP address for the host to your /etc/hosts (or wherever Windows stores the hosts file; look in C:\Windows\System32\hosts as a starting point) file on your client. It's just like updating DNS for a single machine.
Don't forget to remove the entry after you're done testing.
When you set up that entry in the hosts file it should have the form:
"IP address of dev server" "olddomain.com"
and when you remove the entry you can simply comment it out with a "#" at the beginning of the line

IIS 6 - Create a virtual directory that points to an IIS application on a different server?

Here's the scenario:
Server A is hosting the 'main' application (www.example.com)
Server B is hosting a support application (b.example.com)
They are connected internally to each other through a 192.* address and are both externally available through DNS
Server A has several virtual directories that are mapped through UNC shares:
www.example.com/virtual1 -> \192.168.1.1\virtual1 (on serverB)
I'd like to be able to run the application that sits on Server B (served through IIS) and make it appear as if it's running on serverA:
www.example.com/application -> b.example.com/app
I'd still want to be able to access server B directly
b.example.com/app
Any ideas?
Edit:
Turns out the application behind the proxy refused to let me dynamically change it's form "action" (nor did it let me change anything else). I was able to display the data from the server; just couldn't post :(
So both answers pointed me in the right direction. I used a proxy:
http://code.google.com/p/iisproxy/
I created a virtual directory on Server A that matched the directories I needed on Server B - and it worked! :-)
This should be possible in IIS. I remember I had to do this once.
Just create a virtual directory using the UNC path pointing to \\ServerB\SharedAppDirOnB and (if necessary) "Connect As..." using the credentials needed for Server B.
If you have problems with "Connect As..." it could be a folder permissions problem of Server B. Try the following thing: add a new user account on your main server which has the same name and password as the account on Server B. It sounds stupid, but I remember it solved my issue. You could for example add a new user account on both servers: "IisCommon" with the same passwords on both servers. Then make sure you give all necessary file access permission to the folder on server B (and the Share permission!). Try first connecting manually using Windows Explorer if you can access the share.
Make sure that you mark the new virtual directory as application and give the right execution permissions.
Another solution would be some kind of reverse proxy. I used a third-party product on IIS 6.0 for this: ISAPIrewrite for IIS. The "proxy" mode allows you to "forward" request made to your main server (www.example.com/...) to your other server, but serving the resulting responses as if they were processed by your main "domain" application. The feature is called "proxy directive". It accepts regular expressions.
Since serving the virtual directory from server A through a UNC share apparently does not work, you need to serve b.example.com/app from server b.
DNS resolves domain names to IP addresses. You are asking for the same domain name to resolve to two different IP addresses, based on a different URL. This is not something that IIS or Windows can do.
Your options are:
write a proxy service on server A that passes requests on to server B. If you want it completely transparent (not just a redirect), you'd have to stream back the response as well. This is not trivial, but possible.
Put the server B page into an IFRAME on a new page on server A.
Use a load balancer in front of both servers that can split traffic based on URL