403 Forbidden after updating host file for localsite

I just installed DevKinsta. I’m trying to work through things for the first time. I have yet to see the WP-Admin page. I have added my local site domain to my windows Hostfile and that cleared one error. WP Admin is still greyed out in Site Info in DevKinsta. When I try to “Open site” i get a 403 Forbidden nginx page that comes up in the browser.

To me I am still working through the install I have not made any changes beyond updating local host file.

Please help.

I don’t know if this is a forward or reverse proxy. Its just a clean install

Hi Dan @Dan_B :wave:

Can you DM us (myself and @Agus and @Alessandro ) a zip file of the current logs?

What we are interested in is the NGINX, PHP-FPM, and Error logs, but it will help if all of the logs are included

Best regards,
Zach
Kinsta Support

Hi @Dan_B :wave: Welcome to DevKinsta community!

First of all, when creating a new WP site in DevKinsta, it would automatically handle/create the require hostname of your local site(s) to that hosts file (DevKinsta might be prompted to run it as Administrator, or it might be prompted to enter the user’s password in Linux) - so you don’t have to add them manually to that hosts file.
They would look something like these:

#### START DEVKINSTA entries
127.0.0.1 localsite.local
127.0.0.1 www.localsite.local
::1 localsite.local
::1 www.localsite.local
#### END DEVKINSTA entries

We also got your DM (your message and the main.log file).
As I can see in that main.log file, the most recent one (when creating localsite.local site), I noticed several errors related to DB root password (as you also mentioned in your DM) - something like these for examples:

[2023-02-27 18:41:06.223] [info]  [containerExec] Command 'mysql -u root -p****** -e "create database localsite;"' on devkinsta_db finished with exit code 1
[2023-02-27 18:41:06.224] [error] [ipcMainStep] Error in operation SITE_CREATION, step database: Error: Error (1): UERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Looks like the password for the DB ROOT user is not correctly setup possibly.

Could you please try to close and shutdown DevKinsta completely (not just minimized) and then please remove/delete only the devkinsta_db container once again from your Docker desktop.
After that, please re-launch DevKinsta and see if you can try to create new WP site with it? and see the process (if it can be completed without any errors?)

Cheers,
Agus

I followed your directions, I deleted the site, shutdown Kinsta and docker, restarted docker, deleted the devkinsta_db container, then recreated the Kinsta site. Below are the files and screenshots from the exercise. Still erroring out. I look forward to hearing from you regarding next steps.

(Attachment Kinsta-Containers.zip is missing)

I followed your directions, I deleted the site, shutdown Kinsta and docker, restarted docker, deleted the devkinsta_db container, then recreated the Kinsta site. Below are the files and screenshots from the exercise. Still erroring out. I look forward to hearing from you regarding next steps.

I tried to include additional info but your email system has rejected it. I will try to send another email that contains all the images in one file.

Thank You

main.log (454 KB)

Supporting Images

Thank you for your reply Dan.

Yeah looks like it’s still the same case as I can still see those error in the latest main.log file - and that’s the reason why you got “Something bad happened” as shown in that screenshot you shared :

[2023-02-28 09:46:48.179] [info] [containerExec] Command ‘mysql -u root -p****** -e “create database localsite;”’ on devkinsta_db finished with exit code 1
[2023-02-28 09:46:48.180] [error] [ipcMainStep] Error in operation SITE_CREATION, step database: Error: Error (1): UERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

As I can understand, you just installed DevKinsta (for the first time) and you don’t have any sites in created/imported yet to your local computer (DevKinsta) right? and no other data in your Docker , and I think you don’t have any important files/data in it?

If that so, you may want to consider to remove and clean-up DevKinsta completely (and remove any folders/data related to it, all containers, network volumes, etc.), and also need to remove/delete anything inside these folders (e.g.: C:\Users\intoc\AppData\Roaming\DevKinsta , and C:\Users\intoc\DevKinsta ) and start from scratch to re-install DevKinsta.
Also, please try to remove/un-install Docker Desktop completely and re-install it as well just to be sure.

See if with the clean re-install for both DevKinsta and Docker from scratch will help, cause the issue here seems to be something with that MySQL ROOT password , that’s not set properly in that docker’s container devkinsta_db (you tried to remove it but still didn’t help).

Cheers,
Agus

I can do that. This will be the second reinstall that I will be conducting. I will un-install both programs. And delete all trace directories.

During the installation process I will install for “all users”. Is there anything else I should make sure to do during the install?

Hi @Dan_B ,
that should be all, be sure to run the installation as admin
Let us know how it goes.

Regards,
Alessandro

Same result. Appears to be erroring in the same way with the same result
main.log (176.7 KB)

Thank you for your update Dan.

Yeah, this is quite strange as you have re-installed completely and everything from scratch (I assumed you also removed everything completely as I suggested before), :thinking: but you keep getting the same error (something bad happened) due to that DB root password issue as shown in that newest main.log file, such as:

[2023-03-01 14:39:40.043] [info]  [containerExec] Command 'mysql -u root -p****** -e "create database local3site;"' on devkinsta_db finished with exit code 1
[2023-03-01 14:39:40.044] [error] [ipcMainStep] Error in operation SITE_CREATION, step database: Error: Error (1): UERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

So far, I have not been able to replicate the issue on my other spare computer running Windows 10 Pro (with DevKinsta 2.9.0 and Docker Desktop 4.17.0 (99724)). I’ve tried both with Hyper-V and WSL2 engine/option in Docker Desktop (WSL 2 engine is a bit slower though than Hyper-V). Note that the containers/images would need to be re-setup for each Hyper-V and WSL 2 (they are completely using different data).

I also even just now removed everything (Docker Desktop and DevKinsta) on that Windows 10 Pro machine, as I mentioned/suggested to you above, and re-installed Docker Desktop (same latest version) as well as re-installed DevKinsta 2.9.0.
But still DevKinsta was also able to create new local WP site just fine (I didn’t get MySQL root password / access denied issue at all) - that I tried with both WSL 2 and Hyper-V (I also had to restart my computer before I re-install everything from scratch) .

May I know what’s your Windows version (10/11 and if it’s Home or Pro version)? also if you’re using WSL2 or Hyper-V in your Docker Desktop 4.17.0 settings ?

Also, could you please open your Docker Desktop, click on the “Containers” tab and click on the devkinsta_db container name.
Then, on that devkinsta_db container, click on the “Inspect” tab, and (under the “Environment” please note/copy the MySQL Root password shown there).
After that, click the “Terminal” tab there, and type this:
mysql -u root -p

When prompted to enter the password, please see if you can login there with that MYSQL ROOT Password shown in that “Inspect” tab before?

If it’s not working (failed password), then something is really not setup correctly with that Root DB password in that container.

Cheers,
Agus

I have tried again and it continues to fail. I can’t blow more time on trying to get this to work. I have downloaded and installed WAMP and after about 30 minutes of tinkering I have gotten that to work. I am sure devkinsta isa great tool, but it is kind of like the difference between PC and Mac. Mac(devkinsta) obscures many settings files making trouble shooting difficult. PC(Wamp) all of the settings files are readily available. I was able to review all the config settings on Wamp and slowly correct the configuration problems. Download to working system in less than half a day. Open systems are good thing.

Thank you again for the assistance you provided. Maybe some time in the future I will be able to come back to devkinsta.

Thank you for your reply and update Dan!

I’m really sorry to hear that it’s still not working from your end.
Yesterday I got similar report from the other user (on Windows 11 Home) and I suggested the same there (to re-install everything from scratch) and it finally worked fine.
So technically, the method I suggested previously should work (with completely clean install) :slight_smile:

You’re most welcome Dan!
Sure, please take your time and to give it another try anytime you want! Hopefully it will work fine on your local Windows computer.

Cheers,
Agus