docs icon indicating copy to clipboard operation
docs copied to clipboard

Update nginx.md

Open RickX56 opened this issue 3 years ago • 4 comments

By submitting this pull request, I confirm the following: please fill any appropriate checkboxes, e.g: [X]

  • [x] I have read and understood the contributors guide, as well as this entire template.
  • [x] I have made only one major change in my proposed changes.
  • [x] I have commented my proposed changes within the code.
  • [x] I have tested my proposed changes, and have included unit tests where possible.
  • [] I am willing to help maintain this change if there are issues with it later.
  • [x] I give this submission freely and claim no ownership.
  • [] It is compatible with the EUPL 1.2 license
  • [] I have squashed any insignificant commits. (git rebase)

Please make sure you Sign Off all commits. Pi-hole enforces the DCO.


What does this PR aim to accomplish?: A detailed description, screenshots (if necessary), as well as links to any relevant GitHub issues

This modification makes the Web Interface working with NGINX.

How does this PR accomplish the above?: A detailed description (such as a changelog) and screenshots (if necessary) of the implemented fix

Edit /etc/nginx/nginx.conf to contain the following in the http section: gzip on; gzip_min_length 1000; gzip_proxied expired no-cache no-store private auth; gzip_types text/plain application/xml application/json application/javascript application/octet-stream text/css; include /etc/nginx/conf.d/*.conf;

What documentation changes (if any) are needed to support this PR?: A detailed list of any necessary changes

Add section before section 7 with "Edit /etc/nginx/nginx.conf to contain the following in the http section: gzip on; gzip_min_length 1000; gzip_proxied expired no-cache no-store private auth; gzip_types text/plain application/xml application/json application/javascript application/octet-stream text/css; include /etc/nginx/conf.d/*.conf; "

(This is my first ever contribution to GitHub, so I hope the formatting is okay). Thank you for developing such great tool!

  • You must follow the template instructions. Failure to do so will result in your pull request being closed.
  • Please respect that Pi-hole is developed by volunteers, who can only reply in their spare time.

RickX56 avatar Nov 27 '21 19:11 RickX56

✔️ Deploy Preview for pihole-docs ready!

🔨 Explore the source changes: 7b0ae62d5f2cda6011416c2316f1f3b9d1d62293

🔍 Inspect the deploy log: https://app.netlify.com/sites/pihole-docs/deploys/61ba5f1081d24000080602b8

😎 Browse the preview: https://deploy-preview-604--pihole-docs.netlify.app/guides/webserver/nginx

netlify[bot] avatar Nov 27 '21 19:11 netlify[bot]

Thanks for your contribution. Could you elaborate a bit more, why you added this section?

The automatic test fail due to styling:

docs/guides/webserver/nginx.md:85:76 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
docs/guides/webserver/nginx.md:86 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"]
docs/guides/webserver/nginx.md:94:1 MD029/ol-prefix Ordered list item prefix [Expected: 8; Actual: 9; Style: 1/2/3]
docs/guides/webserver/nginx.md:100:1 MD029/ol-prefix Ordered list item prefix [Expected: 9; Actual: 8; Style: 1/2/3]
docs/guides/webserver/nginx.md:106:1 MD029/ol-prefix Ordered list item prefix [Expected: 10; Actual: 9; Style: 1/2/3]
docs/guides/webserver/nginx.md:112:1 MD029/ol-prefix Ordered list item prefix [Expected: 11; Actual: 10; Style: 1/2/3]
docs/guides/webserver/nginx.md:118:1 MD029/ol-prefix Ordered list item prefix [Expected: 12; Actual: 11; Style: 1/2/3]
docs/guides/webserver/nginx.md:124:1 MD029/ol-prefix Ordered list item prefix [Expected: 13; Actual: 12; Style: 1/2/3]

yubiuser avatar Nov 27 '21 19:11 yubiuser

@yubiuser So I added the gzip command to limit the file size while retaining the original file mode, ownership and timestamp. The main change is include /etc/nginx/conf.d/*.conf;. Before adding this line the web UI was not working (nothing was displayed at all in the web page). I found this fix on https://wiki.archlinux.org/title/Pi-hole#Nginx_instead_of_Lighttpd

RickX56 avatar Dec 15 '21 10:12 RickX56

The tests still faill here

docs/guides/webserver/nginx.md:85:76 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
docs/guides/webserver/nginx.md:86 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```bash"]
docs/guides/webserver/nginx.md:106:1 MD029/ol-prefix Ordered list item prefix [Expected: 10; Actual: 9; Style: 1/2/3]
docs/guides/webserver/nginx.md:112:1 MD029/ol-prefix Ordered list item prefix [Expected: 11; Actual: 10; Style: 1/2/3]
docs/guides/webserver/nginx.md:118:1 MD029/ol-prefix Ordered list item prefix [Expected: 12; Actual: 11; Style: 1/2/3]
docs/guides/webserver/nginx.md:124:1 MD029/ol-prefix Ordered list item prefix [Expected: 13; Actual: 12; Style: 1/2/3]

yubiuser avatar Dec 15 '21 19:12 yubiuser