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

Start nginx with -e stderr parameter #2404

Merged
merged 4 commits into from
Feb 22, 2022
Merged

Conversation

lucacome
Copy link
Member

@lucacome lucacome commented Feb 1, 2022

NGINX tries to open /var/log/nginx/error.log (the default error log) before loading the configuration. We don't have that file because we write directly to stderr.
In some configurations, this will result in an error line like this

nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

With this change, we tell NGINX that we want to use stderr during startup and reload, i.e. before the configuration is loaded.

@lucacome lucacome requested a review from a team February 1, 2022 03:44
@lucacome lucacome self-assigned this Feb 1, 2022
@lucacome lucacome requested review from pleshakov and ciarams87 and removed request for a team February 1, 2022 03:44
@github-actions github-actions bot added the bug An issue reporting a potential bug label Feb 1, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2404 (b636a8b) into master (1e38b54) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2404      +/-   ##
==========================================
- Coverage   53.69%   53.65%   -0.05%     
==========================================
  Files          48       48              
  Lines       14203    14203              
==========================================
- Hits         7627     7621       -6     
- Misses       6338     6342       +4     
- Partials      238      240       +2     
Impacted Files Coverage Δ
internal/nginx/manager.go 0.00% <0.00%> (ø)
...ternal/k8s/appprotect/app_protect_configuration.go 86.16% <0.00%> (-0.58%) ⬇️
internal/k8s/configuration.go 95.47% <0.00%> (-0.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e38b54...b636a8b. Read the comment docs.

@lucacome lucacome enabled auto-merge (squash) February 3, 2022 06:06
@lucacome lucacome requested a review from jjngx February 22, 2022 17:52
@lucacome lucacome merged commit c4d49db into master Feb 22, 2022
@lucacome lucacome deleted the fix/missing-error-file branch February 22, 2022 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a potential bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants