Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 847 forks source link

Default Nginx config #2279

Closed tomjn closed 2 years ago

tomjn commented 4 years ago

When a site doesn't provide an Nginx config, we should fallback to a generic Nginx config in the sites provisioner

Mte90 commented 3 years ago

I am just thinking how to fix this issue. https://github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/provision/provision-site.sh#L86 Looking here I think that the point is to check here if the file exists, otherwise pick the files from /srv/provision/core/nginx/config/nginx.conf.

GitHub
VVV/provision-site.sh at develop · Varying-Vagrant-Vagrants/VVV
An open source Vagrant configuration for developing with WordPress - VVV/provision-site.sh at develop · Varying-Vagrant-Vagrants/VVV
Mte90 commented 3 years ago

No we need the nginx file from https://github.com/Varying-Vagrant-Vagrants/custom-site-template/blob/master/provision/vvv-nginx-default.conf So I am wondering if it is the case to download it or keep a copy in VVV as is not mandatory to use that in the vvv-config so the file cannot exist.

GitHub
custom-site-template/vvv-nginx-default.conf at master · Varying-Vagrant-Vagrants/custom-site-template
A site provisioner for VVV. Contribute to Varying-Vagrant-Vagrants/custom-site-template development by creating an account on GitHub.

Or another option is add a big alert about the file is not available.

tomjn commented 3 years ago

we would have a copy of the file and code to set it up in VVV core. We wouldn't support the custom options though, just hosts and TLS