Skip to content

update sample-nginx.conf#538

Merged
dajohi merged 4 commits intodecred:masterfrom
chappjc:assets-nginx
Sep 25, 2019
Merged

update sample-nginx.conf#538
dajohi merged 4 commits intodecred:masterfrom
chappjc:assets-nginx

Conversation

@chappjc
Copy link
Copy Markdown
Member

@chappjc chappjc commented Sep 20, 2019

Fix the assets location. With the root directive, it would look for
files in /opt/dcrstakepool/public/assets/..., but "assets" is not a
directory that exists in the public folder. Use the alias directive
instead to map all paths under /assets/ to the public/ folder.

Make a comment about ssl_dhparam.

Put ssl and http2 in the port 443 server's listen line.

Add the needed gzip settings.

Disable TLSv1, only using TLSv1.1 and TLSv1.2. Also make a note about
TLSv1.3, which is in newer nginx versions.

Change the http->https rewrite to a return. Use code 308 so that
methods are unchanged (POST stays POST).
https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return

@jholdstock
Copy link
Copy Markdown
Member

Approving because the changes look fine, but I have not actually tested this file with a real nginx installation. I don't have nginx fronting my dev or test environments (too lazy...)

Maybe @JoeGruffins could check this out, I think he has nginx in front of his test site.

@dajohi dajohi requested a review from JoeGruffins September 23, 2019 13:45
@chappjc
Copy link
Copy Markdown
Member Author

chappjc commented Sep 23, 2019

@JoeGruffins please do test it out since I think you added in the gzip_static block. It wasn't working form me on account of root vs alias, but also I think the "*" in the location wasn't working as intended.

Copy link
Copy Markdown
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I find this rate limiting

limit_req zone=stakepool burst=5;

to be too restrictive and leads to images not loading

Screenshot_20190925-074642

I've always commented that line out. Do you have any better values, or is it a sorta trial error thing?

Comment thread sample-nginx.conf
@chappjc
Copy link
Copy Markdown
Member Author

chappjc commented Sep 24, 2019

Rate limiting was a problem for me too. The assets location can have something with burst:

    limit_req zone=stakepool burst=58 delay=24;

But I'd also raise the sustained limit too.

Fix the assets location. With the root directive, it would look for
files in /opt/dcrstakepool/public/assets/..., but "assets" is not a
directory that exists in the public folder.  Use the alias directive
instead to map all paths under /assets/ to the public/ folder.

Make a comment about ssl_dhparam.

Put ssl and http2 in the port 443 server's listen line.

Add the needed gzip settings.

Disable TLSv1, only using TLSv1.1 and TLSv1.2.  Also make a note about
TLSv1.3, which is in newer nginx versions.

Change the http->https rewrite to a return.  Use code 308 so that
methods are unchanged (POST stays POST).
@chappjc
Copy link
Copy Markdown
Member Author

chappjc commented Sep 25, 2019

@dajohi Looks to be merge-ready.

@dajohi dajohi merged commit 8cdf3c0 into decred:master Sep 25, 2019
jyap808 pushed a commit to ubiq/dcrstakepool that referenced this pull request Dec 16, 2019
* update sample-nginx.conf

Fix the assets location. With the root directive, it would look for
files in /opt/dcrstakepool/public/assets/..., but "assets" is not a
directory that exists in the public folder.  Use the alias directive
instead to map all paths under /assets/ to the public/ folder.

Make a comment about ssl_dhparam.

Put ssl and http2 in the port 443 server's listen line.

Add the needed gzip settings.

Disable TLSv1, only using TLSv1.1 and TLSv1.2.  Also make a note about
TLSv1.3, which is in newer nginx versions.

Change the http->https rewrite to a return.  Use code 308 so that
methods are unchanged (POST stays POST).

* increase rate limit

* note that /opt/dcrstakepool is an example

* update readme with installation suggestions
ljk662 pushed a commit to bisontrails/dcrstakepool that referenced this pull request Mar 4, 2020
* update sample-nginx.conf

Fix the assets location. With the root directive, it would look for
files in /opt/dcrstakepool/public/assets/..., but "assets" is not a
directory that exists in the public folder.  Use the alias directive
instead to map all paths under /assets/ to the public/ folder.

Make a comment about ssl_dhparam.

Put ssl and http2 in the port 443 server's listen line.

Add the needed gzip settings.

Disable TLSv1, only using TLSv1.1 and TLSv1.2.  Also make a note about
TLSv1.3, which is in newer nginx versions.

Change the http->https rewrite to a return.  Use code 308 so that
methods are unchanged (POST stays POST).

* increase rate limit

* note that /opt/dcrstakepool is an example

* update readme with installation suggestions
ljk662 pushed a commit to bisontrails/dcrstakepool that referenced this pull request Mar 4, 2020
* update sample-nginx.conf

Fix the assets location. With the root directive, it would look for
files in /opt/dcrstakepool/public/assets/..., but "assets" is not a
directory that exists in the public folder.  Use the alias directive
instead to map all paths under /assets/ to the public/ folder.

Make a comment about ssl_dhparam.

Put ssl and http2 in the port 443 server's listen line.

Add the needed gzip settings.

Disable TLSv1, only using TLSv1.1 and TLSv1.2.  Also make a note about
TLSv1.3, which is in newer nginx versions.

Change the http->https rewrite to a return.  Use code 308 so that
methods are unchanged (POST stays POST).

* increase rate limit

* note that /opt/dcrstakepool is an example

* update readme with installation suggestions
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

Successfully merging this pull request may close these issues.

4 participants