DevKinsta open site problem

I have been going around in circles for hours now trying to work out what is going on and I have now hit a wall and I could do with some help.

For some reason all of the sites show the same web page and additionally some of the sites when I click on the open site button. By the time it gets to the browser (chrome), the port gets stripped from the url and I get presented with the welcome to NGINX screen.

If I put the port in to try and get to admin I get a login screen but no css as I assume its not getting the port on the url right either. I login and it gives me a nginx not found error as the port is once again stripped.

Some of the sites do work properly so it must be something unique to the sites themselves.

Only thing I can say is that they were working. There have been no changes. I have totally reset and even uninstalled chrome.

I am pulling my hair out. One of the sites is a site I am migrating from and I really need it to work :frowning:

Any help in trying to get to the bottom of this issue would be really appreciated.

working site

not working site

As you can see the port has been stripped. Even adding the port makes no difference it strips the port and displays the welcome screen over and over.

oh and here is my sites panel - pay close attention to the preview image

Howdy @Robert_Craig :waving_hand:,

It’s been a while friend.

The behavior you’re describing may be similar to what’s taking place in this thread:

The tl;dr is that all sites were opening to an NGINX not found page.

This ended up being an issue with the NGINX config. Deleting it and restarting DevKinsta seemed to do the trick here.

Please see the thread above to see if it’s similar to your case and if the solution suggested there works for you.

If not, may you share the contents of your:

  1. /etc/hosts file
    ( at least for the DevKinsta section, between “#### START DEVKINSTA entries” and “#### END DEVKINSTA entries” )

  2. nginx config file for the particular site in question (in the ~/DevKinsta/nginx_sites/the-site-name.conf file)

kindly,
Shawn C.

I tried removing the conf file and restarted. I saw it create a fresh configuration file. But unfortunately it still does not work :frowning:

/etc/hosts

START DEVKINSTA entries

127.0.0.1 framerpress.local
127.0.0.1 www.framerpress.local
::1 framerpress.local
::1 www.framerpress.local
127.0.0.1 seo-development.local
127.0.0.1 www.seo-development.local
::1 seo-development.local
::1 www.seo-development.local
127.0.0.1 framer-react.local
127.0.0.1 www.framer-react.local
::1 framer-react.local
::1 www.framer-react.local
127.0.0.1 eswoop.local
127.0.0.1 www.eswoop.local
::1 eswoop.local
::1 www.eswoop.local
127.0.0.1 rcs-xrp-server.local
127.0.0.1 www.rcs-xrp-server.local
::1 rcs-xrp-server.local
::1 www.rcs-xrp-server.local
127.0.0.1 retro-game-emporium.local
127.0.0.1 www.retro-game-emporium.local
::1 retro-game-emporium.local
::1 www.retro-game-emporium.local
127.0.0.1 framework.local
127.0.0.1 www.framework.local
::1 framework.local
::1 www.framework.local
127.0.0.1 first4frames-gallery.local
127.0.0.1 www.first4frames-gallery.local
::1 first4frames-gallery.local
::1 www.first4frames-gallery.local
127.0.0.1 framer.local
127.0.0.1 www.framer.local
::1 framer.local
::1 www.framer.local
127.0.0.1 cumbernauld-st-andrews-no-199.local
127.0.0.1 www.cumbernauld-st-andrews-no-199.local
::1 cumbernauld-st-andrews-no-199.local
::1 www.cumbernauld-st-andrews-no-199.local
127.0.0.1 woocommercetest.local
127.0.0.1 www.woocommercetest.local
::1 woocommercetest.local
::1 www.woocommercetest.local
127.0.0.1 synced-woocommerce.local
127.0.0.1 www.synced-woocommerce.local
::1 synced-woocommerce.local
::1 www.synced-woocommerce.local
127.0.0.1 fix-f4fgallery.local
127.0.0.1 www.fix-f4fgallery.local
::1 fix-f4fgallery.local
::1 www.fix-f4fgallery.local
127.0.0.1 test-website.local
127.0.0.1 www.test-website.local
::1 test-website.local
::1 www.test-website.local

END DEVKINSTA entries

There are a huge number of sites that actually no longer exist when I look at that which is interesting in itself!

See the above image for the sites list I actually have.

Hi @Robert_Craig,

For the sites that are currently displaying the default Nginx page, could you please check if the WordPress files and database for those sites still exist in the Docker volume?

You can log into the Docker container by using the following command:
docker exec -u www-data -it devkinsta_fpm bash
Once you’re inside the container, navigate to the WordPress directory by running:
cd /www/kinsta/public/

Then, list the WordPress folders available. Refer to the screenshot below for guidance:

To check the database, access the database manager of any functioning site and see if the database for the other sites is still listed.

Example:

Also to better assist you, could you please provide the following information:

Docker Desktop version:
OS machine version:
DevKinsta version.

Cheers!

Web folders exist and database access is there also

Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

Docker version 23.0.5, build bc4487a

DevKinsta version is 2.13.4 and the images are 1.3.6

robert@B450-AORUS-ELITE:~$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
kinsta/devkinsta_mailhog 1.3.6 2808fe07b43a 12 months ago 392MB
kinsta/devkinsta_adminer 1.3.6 dd3fb0acd9da 12 months ago 105MB
kinsta/devkinsta_nginx 1.3.6 1888a6252a0d 12 months ago 48.1MB
kinsta/devkinsta_db 1.3.6 b94c2c0a5ddb 12 months ago 412MB
kinsta/devkinsta_fpm 1.3.6 ed897ca0cd5c 12 months ago 682MB

Additional note would be if i create a new site it functions correctly. I have at great inconvenience deleted the caches on the chrome also. Tried firefox (same result) - so I am assured it is a problem with the environment more than it is a browser issue.

Hello @Robert_Craig :waving_hand:

Can you please send us the main.log file? https://kinsta.com/docs/devkinsta/devkinsta-troubleshooting/error-codes/#viewing-the-application-log-file

Also (and this might be a shot in the dark). Have you tried closing devKinsta, deleting all containers from Docker whose name starts with devkinsta_ and starting DevKinsta again?

Kind regards

(main.log redacted)

Ive deleted all containers and images just to be sure with no difference to the outcome.

For those sites displaying the default Nginx page, can you please check if their associated Nginx config file still exists inside the devkinsta_nginx container? The site Nginx config files are located in the /etc/nginx/sites directory.

Example:

sure what is the command to use? I am on linux

Can you try this:
docker exec -it devkinsta_nginx /bin/sh

There all there

Hi @Robert_Craig, thanks for sharing the screenshot!

Could you also show us what your Port Selector looks like—similar to the example below?

I just want to cover all bases and will try to replicate the issue in our end.

there you go

to save a response of take the auto off. I have tried that and it makes no difference to the outcome. I have done this restarting devkinsta. removing containers and images and also full restart of the host.

I have even reset my browser over and over during doing this.

AS an additional note. I highlighted further up that my hosts file is getting populated with old names that are no longer in the sites list. Would be interested in getting an understanding on how to fix that. Shouldn’t the application remove anything that is not in the sites list? Perhaps a bug to address in the application?

Hi @Robert_Craig! Thank you for your reply!

I have attempted to replicate this issue on my end using Ubuntu 20.04, along with the latest versions of DevKinsta and Docker. However, at the moment I am unable to do so. Both of the sites I have imported from MyKinsta load correctly, and show the expected content. I have not found a way to get these sites to display the default NGINX page at the moment.

I would like to review the NGINX configuration files along with the wp-config.php files for the affected sites. Would it be possible to please output the content of the NGINX configuration files located within the devkinsta_nginx container, and copy those to a local file on your system?

You should be able to run “docker exec -it devkinsta_nginx /bin/sh” as Adrian advised earlier. Then, you can run “cat FILENAME.conf” to output the content to the terminal window. From there you should be able to copy/paste that into a text editor to save it as a file outside of the Docker container to share with us.

The wp-config.php files should be located within the site files of the local site installation located under ~/DevKinsta/public/siitename

If you could please send these files to me in a private/direct message that would be appreciated.

We look forward to hearing from you!

I have dM’d you the information as you have requested

Hi @Robert_Craig! Thank you for your reply and for sharing the configuration files with me!

I have reviewed these files, and nothing seems out of place. The NGINX configurations do match how the default configuration is setup on my test sites. The wp-config.php files also look correct and are pointing to their own individual databases.

This does leave a couple of possibilities. The first one is that there is a system/platform level issue that is causing this issue (such as something being broken with the Docker/DevKinsta installation). Or, there might be a duplicate index file within the root directory of the sites.

The first thing to check will be for that duplicate index file. If you view the site files under ~/DevKinsta/public/siitename do you see multiple index files inside or only one?

If there are duplicate index files such as index.php or index.html, please remove all index files except the one for WordPress and check if that resolves the issue.

If there is only one index file could you please open it and view its contents to see if it matches what’s expected for a default WordPress installation? You may find the default index.php file for a WordPress site in the link below:

https://raw.githubusercontent.com/wordpress/wordpress/refs/heads/master/index.php

If all of the index files do appear to be correct than likely a full reinstallation of Docker and DevKinsta will be required. This would involve fully purging both Docker and DevKinsta from the system, as well as deleting any folders that are left over. Then, fully reinstall DevKinsta and Docker. This would give a clean environment to start from. You may then try reimporting the sites. Please note that this will delete all site data so please do ensure you have any necessary backups of the sites before performing this.

Please let us know first however if there is anything off about the index files in the broken site installations root directories, and if that solves the issue. If a reinstallation is also required we are happy to help answer your questions you have about that, so please let us know as well!

Best regards

Was getting to the point that I need to do that anyways so thanks for trying. However in the mean time I have noticed that it is rehydrating old site names after they have been deleted from devkinsta sites in my /etc/hosts. Where is this kept so that I can remove them in the future. I don’t want old hostnames being hydrated into my /etc/hosts file if I can manage that.

Hello @Robert_Craig :waving_hand:

I have tested and found that I have some residual sites in my hosts file, suggesting that they might not always be removed properly. However, they haven’t reappeared once I deleted those lines.

Am I reading your message right that you see those lines in regards to deleted sites re-appear on their own after you manually remove them from hosts file?