Just trying to create an web application, clients can create their own instance of the app, so I created a wildcard subdomain in CPanel, checked VirtualHosts and the A record in the DNS, all fine.
Now when I go to "client1app.domain.tld" it works, takes me to the clients app, but when that client creates a cname "app.clientdomain.tld" to "client1app.domain.tld", I get redirected to cPanels "Default Web Site Page".
I double-checked everything.
App DNS:
*.domain.tld. 3600 IN A x.x.x.x
Customer DNS
app.clientdomain.tld. 3600 IN CNAME client1app.domain.tld
App VirtualHost:
ServerName _wildcard_.domain.tld
ServerAlias *.domain.tld
Any help is greatly appreciated.
Note: I do have root, this is a VPS.
Simple things first, have you added *.domain.tld as a subdomain in cPanel using the user interface and not the command line?
I have tried to replicate this problem using one of my WHM servers and could not.
I recommend first updating cPanel/WHM to the latest version as some support articles covering wildcard subdomains point to some old versions of cPanel have bugs with wildcard subs which are now fixed.
I would also rebuild the httpd.conf if you have at any point manually edited it. Also make sure that the subdomain is not the same as the hostname as this causes some internal binding errors.
I set my environment up using only the cPanel sudomain button and not using the DNS editors in WHM or cPanel
Related
when i am trying to access my domain with www it shows an error like "This site can’t be reached
www.sustainabletourism.co.in’s server IP address could not be found.
Search Google for sustainable tourism co
ERR_NAME_NOT_RESOLVED"
and working with out wwww.
all dns records are set correctly
plz help me
thanx
As you mentioned DNS is configured corrent, than its is most probably due to wrong setup of virtual host for web server. Depending of the web server in use(eg. Apache or nginx or some other) you can correct this.
In the server alias, you need to add both www and without www of your domain.
My configuration is as follows:
NameCheap has Cloudflare nameservers only.
Openshift has domain alias changed from app-account.rhcloud.com to domain.com.
CloudFlare DNS settings has no A records, but two CNAME records: domain.com is an alias of app-account.rhcloud.com and www is an alias of domain.com.
CloudFlare Page Rules forward http://www.domain.com/* to http://domain.com/$1
These were all configured based on the solutions found online that have worked for others. My domain.com is accessible without issue, but www.domain.com provides this error:
I'm obviously missing something. Help would be greatly appreciated.
just FYI: you can have more than one alias even on free plan with OpenShift. Just go to alias list of you app and you can add another alias - url is: https://openshift.redhat.com/app/console/application/xxxxx-yourapp/aliases
Update: I stand corrected. See the chosen answer for the use of aliases which is a much better solution.
It seems the fix for this was rather simple. The problem was that the www.domain.com needs exist in OpenShift. Because my account is the free tier, OpenShift did not provide me an option to add another domain.
To mimic that, in OpenShift I added another application: PHP 5.4 with the domain alias www.domain.com replacing app-route-account.rhcloud.com.
Then in CloudFlare, I changed www is an alias of domain.com to www is an alias of app-route-account.rhcloud.com.
And, all is well. :)
If I was using a premium OpenShift account, I could have just added another domain to the first application, as www.domain.com. I hope this can help someone.
I want to host a root domain like "example.com". The Alias addon allows you to host sub domains like "www.example.com".
But how to host the root domain "example.com" on cloudcontrol? Because I want to create a redirect from example.com to www.example.com.
I have already setup an alias from www.example.com to my cloudControl app successfully. But I was not able to setup an alias from example.com to my cloudControl app.
I'm not sure, whether I have understood everything with the Alias addon.
Best regards,
Christian
Since you can't add a CNAME to a root romain you can't link it directly to cloudControl.
The ugly way would be to manually create A-records to the (currently 3) cloudControl-loadbalancer-IPs, but cloudControl changes these (adds/removes loadbalancers) sometimes so you shouldn't do this.
For my apps I usually use the "URL"-record-type many DNS-Providers provide. In the background they use A-records to a seperate webserver that returns a redirect to the www-version.
You can also use a service like DNS Made Easy. They provide a custom type called ANAME, that's basically a CNAME without the CNAME limitations. They take care of updating the IP addresses in the background when necessary.
http://www.dnsmadeeasy.com/technology/aname-records/
I am going to change my hosting, and allready rented a new server.
Now I want to configure my DNS via the new hosting/server but my domain is still registrered at the 'old' hoster, how should I do this correctly?
I have tried it via the following two ways, both not working:
Setting up DNS at 'old' host, with my new ip-address at my DNS-records in stead of the old IP. I get Apache is functioning normally... while everything is configured correctly (tested etc, all ok)
Changing nameserver at old host to new one, ns1.newhost.com etc, and then configuring the DNS via DirectAdmin on my new VPS... I've done this about 10hrs ago, only now my domain cannot be resolved. If i lookup the NS info via www.mxtoolbox.com the new nameservers are shown for the domain, but my DNS config is not working...
Am I missing some settings or DNS records?
Step one: make sure you have a record pointing to your new server. Generally, one would use an A record to achieve this. Then, configure apache to listen for your domainname. You can do this by using the ServerName directive. There's no rule saying the DNS server should be on the same server as the webserver.
I'm looking to figure out how to replicate the functionality of GoDaddy's PreviewDNS when I'm moving a site to my own web host based in cpanel.
My setup is this: I have a wordpress multiuser site setup with a subdomain install, and a wildcard redirect.
I can't figure out how I can preview the website for an account before the DNS is switched over to my host from the old host.
I've been able to sorta do this by creating an A record of a subdomain over to my host, but I still have the issue of not being able to test the actual files instead of a copy in a subdomain.
I have two IP addresses attached to the server, one to the server itself and all the shared domains, and the other dedicated to the WP multisite.
When I go to http://ipaddress/~username/, I either get an error, or get redirected to the wordpress multisite's default "this site doesn't exist, sign up now to create it" page. I've tried this with both IP addresses with no avail.
Any ideas?
I think what you're trying to do is ensure that everything is working on the new server before having the DNS globally changed for all users? You could change your local computers hosts file to point the domain (and any subdomains you wish to test) over to the new dedicated IP address, which is essentially moving the DNS over for just yourself.
Here's a pretty good guide on how to do it: http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/