Update webserver proxy

main
Bob Mottram 2021-09-10 15:45:44 +01:00
parent 67a2c2939f
commit ef1696e751
2 changed files with 18 additions and 37 deletions

View File

@ -62,8 +62,6 @@ Create a web server configuration:
And paste the following:
proxy_cache_path /var/www/cache levels=1:2 keys_zone=my_cache:10m max_size=10g
inactive=60m use_temp_path=off;
server {
listen 80;
listen [::]:80;
@ -118,8 +116,6 @@ And paste the following:
location / {
proxy_http_version 1.1;
client_max_body_size 31M;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
@ -135,10 +131,6 @@ And paste the following:
proxy_redirect off;
proxy_request_buffering off;
proxy_buffering off;
location ~ ^/accounts/(avatars|headers)/(.*).(png|jpg|gif|webp|svg) {
expires 1d;
proxy_pass http://localhost:7156;
}
proxy_pass http://localhost:7156;
}
}
@ -146,7 +138,6 @@ And paste the following:
Enable the site:
ln -s /etc/nginx/sites-available/YOUR_DOMAIN /etc/nginx/sites-enabled/
mkdir /var/www/cache
Forward port 443 from your internet router to your server. If you have dynamic DNS make sure its configured. Add a TLS certificate:

View File

@ -1370,9 +1370,6 @@
And paste the following:
</p>
<div class="shell">
proxy_cache_path /var/www/cache levels=1:2 keys_zone=my_cache:10m max_size=10g
inactive=60m use_temp_path=off;
server {<br>
listen 80;<br>
listen [::]:80;<br>
@ -1425,30 +1422,24 @@
}<br>
<br>
location / {<br>
proxy_http_version 1.1;<br>
client_max_body_size 31M;<br>
proxy_set_header Upgrade $http_upgrade;<br>
proxy_set_header Connection "upgrade";<br>
proxy_set_header Host $http_host;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;<br>
proxy_set_header X-Forward-Proto http;<br>
proxy_set_header X-Nginx-Proxy true;<br>
proxy_temp_file_write_size 64k;<br>
proxy_connect_timeout 10080s;<br>
proxy_send_timeout 10080;<br>
proxy_read_timeout 10080;<br>
proxy_buffer_size 64k;<br>
proxy_buffers 16 32k;<br>
proxy_busy_buffers_size 64k;<br>
proxy_redirect off;<br>
proxy_request_buffering off;<br>
proxy_buffering off;<br>
location ~ ^/accounts/(avatars|headers)/(.*).(png|jpg|gif|webp|svg) {<br>
expires 1d;<br>
proxy_pass http://localhost:7156;<br>
}<br>
proxy_pass http://localhost:7156;<br>
proxy_http_version 1.1;<br>
client_max_body_size 31M;<br>
proxy_set_header Host $http_host;<br>
proxy_set_header X-Real-IP $remote_addr;<br>
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;<br>
proxy_set_header X-Forward-Proto http;<br>
proxy_set_header X-Nginx-Proxy true;<br>
proxy_temp_file_write_size 64k;<br>
proxy_connect_timeout 10080s;<br>
proxy_send_timeout 10080;<br>
proxy_read_timeout 10080;<br>
proxy_buffer_size 64k;<br>
proxy_buffers 16 32k;<br>
proxy_busy_buffers_size 64k;<br>
proxy_redirect off;<br>
proxy_request_buffering off;<br>
proxy_buffering off;<br>
proxy_pass http://localhost:7156;<br>
}<br>
}
</div>
@ -1458,7 +1449,6 @@
</p>
<div class="shell">
ln -s /etc/nginx/sites-available/YOUR_DOMAIN /etc/nginx/sites-enabled/<br>
mkdir /var/www/cache
</div>
<p class="intro">