Server not found - any ideas?

Author
Discussion

MitchT

Original Poster:

16,161 posts

215 months

Monday 19th December 2022
quotequote all
I have a hosting service with Krystal. I recently uploaded a friend's website which has previously been hosted elsewhere. I logged into the domain registry he uses and pointed the URL to Krystal's nameservers. The folder containing the website in file manager on Krystal is named the same as the URL. This configuration works perfectly for other websites I have hosted on Krystal combined with domains held elsewhere. However, in the case of my friend's website, all I'm getting is "Server not found" when I browse to the website. It's more than 48 hours since I set it up - this being the time frame you should allow for it to start working. The only difference is that that the sites I've successfully done this for before have a homepage named "index.html". My friend's site has a homepage called "index.php". Should I be doing something differently for a site written in php?

e-honda

9,243 posts

152 months

Monday 19th December 2022
quotequote all
PHP is very different to a static html website.
Static html the web server just hosts static files that can be rendered in the browser.
PHP is server side scripting, the server runs code to generate the content that goes into the response, you typically cannot just copy it to a new location and expect it to work, there is usually a database involved and can be various other bits.
Normally when you've got the setup wrong you get a 500 error, 503 error, a 403 error or see the php code rendering in the browser.

Server not found is not a http status, I suspect it is a Firefox error and means you probably haven't got the DNS and account setup right and it's not even got as far as trying to load what you've uploaded.

MitchT

Original Poster:

16,161 posts

215 months

Monday 19th December 2022
quotequote all
Probably out of my depth then. I make simple HTML and CSS websites. That's as complicated as things get for me!

P4ulB

563 posts

241 months

Tuesday 20th December 2022
quotequote all
I handle a simple PHP website for a client with Krystal. Index.php should work fine without having to do anything extra.

However, in the set up I manage, the files are all located in the root of the public_html folder - no additional folder with the domain URL. This may be due to the hosting package this particular client has with Krystal (Amethyst - only allows 1 hosted site), but worth checking if that's the issue.

Other plans do allow for multiple hosted sites so the setup may be slightly different.

Once logged into cPanel, go to Domains and you can see where the document root is pointing




maffski

1,880 posts

165 months

Tuesday 20th December 2022
quotequote all
First things first. Is the domain pointing to the right place.

If you 'ping www.myfriendswebsite.co.uk' from Windows Command prompt or MacOS Terminal does it respond with the IP address for your Krystal web server?

droopsnoot

12,504 posts

248 months

Tuesday 20th December 2022
quotequote all
Could it be that your `index.php` is trying to open a database which is still pointing to the old host, finding that it cannot because it's no longer on the old server (or maybe it's trying to connect to it as "localhost" and the new host doesn't do it that way), or the database hasn't been copied across, and trapping the error and showing "Server not found"?

MitchT

Original Poster:

16,161 posts

215 months

Tuesday 20th December 2022
quotequote all
P4ulB said:
I handle a simple PHP website for a client with Krystal. Index.php should work fine without having to do anything extra.

However, in the set up I manage, the files are all located in the root of the public_html folder - no additional folder with the domain URL. This may be due to the hosting package this particular client has with Krystal (Amethyst - only allows 1 hosted site), but worth checking if that's the issue.

Other plans do allow for multiple hosted sites so the setup may be slightly different.

Once logged into cPanel, go to Domains and you can see where the document root is pointing
I have the Ruby package which allows unlimited sites. I have a few very simple sites that I've made with HTML & CSS. Each of those are contained in a folder in File Manager that's named after the URL. The folders are all in the blade on the left. If I click on one of the folders the documents appear in the window to the right of the blade. I have the domains registered with gandi.net. If I point a domain at Krystal's nameservers that is enough for it to work.

I've done the same with my friend's site, figuring the same set up would also work, but it doesn't. His domain is registered with 123Reg. I've pointed it at Krystal's nameservers, the same as above, and named folder in the blade on the left in File Manager after the domain, so the configuration is identical. It just doesn't work!

maffski said:
First things first. Is the domain pointing to the right place.

If you 'ping www.myfriendswebsite.co.uk' from Windows Command prompt or MacOS Terminal does it respond with the IP address for your Krystal web server?
I tried this in Terminal on my Mac and I get "No such file or directory".

droopsnoot said:
Could it be that your `index.php` is trying to open a database which is still pointing to the old host, finding that it cannot because it's no longer on the old server (or maybe it's trying to connect to it as "localhost" and the new host doesn't do it that way), or the database hasn't been copied across, and trapping the error and showing "Server not found"?
I don't know. That's where things go over my head!

MitchT

Original Poster:

16,161 posts

215 months

Tuesday 20th December 2022
quotequote all
One thing I've noticed...

On all the other sites I have hosted the document root is the same as the site URL, but on the one I have a problem with the document root is /public_html

There's no apparent way to change this.

768

14,842 posts

102 months

Tuesday 20th December 2022
quotequote all
MitchT said:
maffski said:
First things first. Is the domain pointing to the right place.

If you 'ping www.myfriendswebsite.co.uk' from Windows Command prompt or MacOS Terminal does it respond with the IP address for your Krystal web server?
I tried this in Terminal on my Mac and I get "No such file or directory".
Did you leave in the quotes? That's an odd result. Might be easier to share the domain here.

MitchT

Original Poster:

16,161 posts

215 months

Tuesday 20th December 2022
quotequote all
I didn't include the quotes or "ping".

I just tried again with those included and got "command not found" instead.

The URL is www.jameswoodorganic.uk

768

14,842 posts

102 months

Tuesday 20th December 2022
quotequote all
You need the ping but not the quotes.

It's pointing at 77.72.1.2, is that correct? Certainly looks to be a Krystal server.

MitchT

Original Poster:

16,161 posts

215 months

Tuesday 20th December 2022
quotequote all
If I remove the quotes it seems to ping something. I had to terminate it as it was producing line after line of results.

The Krystal nameservers, according to their own instructions, and which I've pointed the domain at, are...

ns1.krystal.uk
ns2.krystal.uk

Which, according to Krystal, are as follows...

ns1.krystal.uk - 77.72.0.11
ns2.krystal.uk - 139.162.230.184

Harpoon

1,945 posts

220 months

Wednesday 21st December 2022
quotequote all
Your DNS appears to be right as for me the URL resolves and something answers.

However, I think you have some more configuration to do on Krystal as the wrong SSL certificate is being used to answer for the domain (a generic one for the shared server by the looks of it). If you do click through the warning, there's only a Krystal holding page.