You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The vhost configuration files that are generated by puppet are sometimes not according to the best practices and sometimes even follow nginx configuration pitfalls ( http://wiki.nginx.org/Pitfalls ). Before I start fixing and filing a PR for this I would first like to discuss if there are any reasons for why this currently works as it does.
The problem that I see and would like to fix:
We ALWAYS have multiple declarations of root (inside all locations, but the server directive never has one).
I would propose including root in resource::vhost would make it appear in server directive. We could still define a location /, but then it would not need root defined in it. For recource::location if www_root in resource::location is relative to vhost's www_root, we can skip it.
I would also propose introducing a parameter which would let you skip default location / declaration if needed. This is extremely useful when you only want to define a vhost for redirecting to another vhost, thus you do not even need any locations defined.
Can I start working on changes, please tell me what you think.
The text was updated successfully, but these errors were encountered:
Using this module with Owncloud is kind of painful, as it requires the root to be specified inside of the server block and fails to load if root is specified in location /.
Saner behavior, I think, would be using www_root to set root in the server block, as described in the Pitfalls document.
A new (optional) parameter, location_root, should be applied to individual location resources if set. If not, simply don't set it, as it's not required.
The vhost configuration files that are generated by puppet are sometimes not according to the best practices and sometimes even follow nginx configuration pitfalls ( http://wiki.nginx.org/Pitfalls ). Before I start fixing and filing a PR for this I would first like to discuss if there are any reasons for why this currently works as it does.
The problem that I see and would like to fix:
root
(inside all locations, but theserver
directive never has one).I would propose including
root
inresource::vhost
would make it appear inserver directive
. We could still define alocation /
, but then it would not needroot
defined in it. Forrecource::location
ifwww_root
inresource::location
is relative to vhost'swww_root
, we can skip it.I would also propose introducing a parameter which would let you skip default
location /
declaration if needed. This is extremely useful when you only want to define a vhost for redirecting to another vhost, thus you do not even need any locations defined.Can I start working on changes, please tell me what you think.
The text was updated successfully, but these errors were encountered: