Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set ssl log paths when overriding access and error logs #893

Closed
ubellavance opened this issue Sep 30, 2016 · 6 comments
Closed

Cannot set ssl log paths when overriding access and error logs #893

ubellavance opened this issue Sep 30, 2016 · 6 comments

Comments

@ubellavance
Copy link

Hi,

It looks like it is not possible to configure ssl logs when overriding the default values.

These variables can not be defined in manifests or hiera:
ssl_access_log_real
ssl_error_log_real

It looks like they are not defined in init.pp and params.pp like access_log and error_log

@ubellavance
Copy link
Author

In fact I think that the variable names should be ssl_access_log and ssl_error_log, but are somewhat mapped internally with _real variables.

@wyardley
Copy link
Collaborator

wyardley commented Oct 8, 2016

So, the already merged #888 changes this behavior in ways that may be either good or bad for you.

It doesn't hard-code the 'ssl-foo' except in the case where the logfile isn't specified in the config. I need to verify whether nginx is happy when both an SSL and non-SSL listener write to the same log path, which I think is a possible outcome if the user configures them that way.

A little hard to read, but current behavior:
https://github.com/voxpupuli/puppet-nginx/blob/master/templates/vhost/vhost_ssl_header.erb#L84-L96
https://github.com/voxpupuli/puppet-nginx/blob/master/templates/vhost/vhost_ssl_header.erb#L96-L105

$ssl_access_log_real (and, for that matter, $ssl_access_log, neither of which exist in current master) aren't intended to be user manipulable, and the directive in the nginx server {} block is always just access_log / error_log.

I think you can set a custom log in either an SSL or non-SSL vhost. However, in the case where you set ssl => true and also set a custom access / error log, I'm not sure if the behavior is ideal or not.

@ubellavance
Copy link
Author

So basically the already merged #888, it should work, it is just not in master?

Thanks,

@wyardley
Copy link
Collaborator

wyardley commented Oct 9, 2016

It's merged, but it's not yet released to Puppet Forge as best I know. So if you're using 'module install', you'll probably still have the older code, but if you use current git master, you should have the changes.

@wyardley
Copy link
Collaborator

I think #888 will help with this and also should work as normal with the default config. However, if you set a custom logfile name and rely on the module to create SSL and non-SSL vhosts for you, the filename will be the same for both; not sure if that's a problem.

@wyardley
Copy link
Collaborator

#888 is merged. If we need to do further enhancement of how logfiles are specified, please open a new issue or PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants