Setup cPanel on CentOS, website not working - cpanel

I've setup a cPanel server on CentOS. Followed through with all the basic recommended installation options.
I've created an account - mydomain.com.au - and have been able to access the cpanel for that account through WHM.
My server's public IP is 1.2.3.4, I've created an A record in my domain register for www.mydomain.com.au -> 1.2.3.4. This does resolve correctly when checked through ping and mxtoolbox.
However, when I try to access the site www.mydomain.com.au, I get taken to "This web page is not available".
Am I missing something? I haven't setup the cPanel server with DNS hosting/private nameserver as I'm trying to get something basic going first, just a simple hosting account.

I think you have not updated the correct "A" record of your site and due to that you are getting this issues, Please update it correctly and check your domain DNS report at : http://intodns.com/

Check that account's VirtualHost in httpd.conf, maybe it has a wrong IP.

Point the IP address correctly to resolve the issue, if you have DNS clustering enabled and you have WHM access then you can edit it accordingly in WHM or you can contact your support that manages the nameserver's for the domain and ask them to point it.

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.

Bitnami Trac apache set domain name

I recently installed Bitnami trac and now I want to access it using my domain name.
I've made the necessary changes to the apache config file (httpd.conf) found in C:\Bitnami\trac-1.0.5-0\apache2\conf\ directory. I've installed trac in port 8080.
So this is the only change I made.
ServerName trac.mydomain.com:8080
I had trac in another server before, and that time also this was the only change I made to get my domain work with it. But this time it doesn't work.
Can somebody please tell me where I've missed? Do I have to update any other place?
According to your comment, you can access the server fine by using the IP address, but can't access it at all when using the domain name. This sounds like it might not be related to Trac at all. Here are a couple of things to try:
Run "nslookup your-domain-name.com". You should get a result that says "Addresses:" and lists your server's IP address. If you don't (or if you get a "Non-existent domain" error), then your DNS server isn't mapping your domain name to your IP address correctly.
Look through Apache's various log files on your server and see if there is any evidence of your request ever reaching your server. Whenever I do this, I first change LogLevel to debug in the Apache config files so that I get as much output as possible (restart Apache after changing the config file). If a 'debug'-level log doesn't even show that Apache saw the request, then something between your server and your local system is causing problems (a firewall perhaps). If the Apache logs do show that the request made it through, then the problem is likely an Apache configuration problem and the log output should provide hints as to how to continue.
Try connecting via VPN and then accessing your server by domain name (not IP address). If you can access the server by IP but not by name, then the server may not know its own domain name.
Bitnami developer here. By default bitnami installations accept petitions from any IP so you don't have to set the ServerName.
Although, if you want your page to be accessible using trac.yourdomain.com, you should consider using apache virtualHosts, could you try to follow this documentation page?
https://wiki.bitnami.com/Components/Apache#How_to_create_a_Virtual_Host.3f

Wrong document root after giving dedicated IP to an account

I'm trying to assign a dedicated IP to an account on my cPanel/WHM installation and I get the default cgi-sys/defaultwebpage.cgi showed when I try to access the website...
When I ping the domain on both my server and at home, I get to good IP (suppose it's 1.1.1.1).
I take a look into /var/cpanel/userdata/website.com (website.com is an example) to see if the documentroot is correctly set and also the IP. Everything is fine. (for ssl and non-ssl)
After, I take a look into the /usr/local/apache/conf/httpd.conf to see if everything was correctly configured and it's also good.
I check if the DNS zone was correctly updated and it is.
I have used WHM to assign the new IP so it should work (I have done this before and everything was fine...).
I use the latest stable version of cPanel/WHM.
When I try to access the link website.com/lol.php, it look into /usr/local/apache/htdocs/ not in /home/website/public_html ...
Also, the SSL work, but not the non-ssl (yesterday I've added a new wildcard SSL to my domain).
The problem was related to a third party product : Varnish.
I had to refresh the address pool to get it working.