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
Any help in trying to get to the bottom of this issue would be really appreciated.
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:
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.
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?
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.
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?
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.
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:
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!
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.
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?