VVV: Bug: Fresh install leads to Nginx 404 error due to wrong path in default site template
Are you using the latest stable or develop branch version of VVV?
No
Is it a new VVV, or an existing VVV that used to work?
Existing, worked but now broken
Did you use a CustomFile?
No (default)
Whats the problem?
I’m using a VVV instance for years, which has always worked, and I needed to destroy it to move from VMware to vBox. I did not change anything, but after I provisionned the VM, I got a Nginx 404 error (with a brand new design I never saw btw ^^).
To fix that, I had to fix a wrong path in public_html/vvv-nginx-default.conf, which is generated from the official VVV’s template and restart Nginx.
The generated template includes this line:
root "{vvv_path_to_site}{vvv_public_dir}";
while, I guess, it should be:
root "{vvv_path_to_site}/{vvv_public_dir}";
Notice the missing
/character. The resulting path on the VM looks likewordpress-localpublic_htmlwhich is wrong.
After I modified this path, Nginx stopped complaining.
However, what I can’t get out of my mind is the following:
How is that possible that this template, including this typo, worked for years and somehow now stopped working?
The only issue I faced while I re-provisionned again is about the new nginx signing key that expired last month. I fixed that from one of the VVV’s latest commit, but is there an issue with an older Nginx version? How Nginx was actually able to reach out the correct path and display the site while the root path was incorrect and missing a /? This mystery is actually making me losing my mind ^^
How do we reproduce it?
Just provision a new VVV instance by using the default site template in config.yml I guess ?
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
What is the output of vagrant status
.
Which Operating System are you using?
Microsoft Windows
Which provider are you using?
VirtualBox 7
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 28 (19 by maintainers)
@tomjn Thank you for the hard work made to solve this issue, this is really appreciated.