mirror of https://gitlab.com/bashrc2/epicyon
Update webserver proxy
parent
67a2c2939f
commit
ef1696e751
|
@ -62,8 +62,6 @@ Create a web server configuration:
|
||||||
|
|
||||||
And paste the following:
|
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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
@ -118,8 +116,6 @@ And paste the following:
|
||||||
location / {
|
location / {
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
client_max_body_size 31M;
|
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 Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
|
||||||
|
@ -135,10 +131,6 @@ And paste the following:
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
proxy_request_buffering off;
|
proxy_request_buffering off;
|
||||||
proxy_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;
|
proxy_pass http://localhost:7156;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,7 +138,6 @@ And paste the following:
|
||||||
Enable the site:
|
Enable the site:
|
||||||
|
|
||||||
ln -s /etc/nginx/sites-available/YOUR_DOMAIN /etc/nginx/sites-enabled/
|
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:
|
Forward port 443 from your internet router to your server. If you have dynamic DNS make sure its configured. Add a TLS certificate:
|
||||||
|
|
||||||
|
|
|
@ -1370,9 +1370,6 @@
|
||||||
And paste the following:
|
And paste the following:
|
||||||
</p>
|
</p>
|
||||||
<div class="shell">
|
<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>
|
server {<br>
|
||||||
listen 80;<br>
|
listen 80;<br>
|
||||||
listen [::]:80;<br>
|
listen [::]:80;<br>
|
||||||
|
@ -1427,8 +1424,6 @@
|
||||||
location / {<br>
|
location / {<br>
|
||||||
proxy_http_version 1.1;<br>
|
proxy_http_version 1.1;<br>
|
||||||
client_max_body_size 31M;<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 Host $http_host;<br>
|
||||||
proxy_set_header X-Real-IP $remote_addr;<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-For $proxy_add_x_forwarded_for;<br>
|
||||||
|
@ -1444,10 +1439,6 @@
|
||||||
proxy_redirect off;<br>
|
proxy_redirect off;<br>
|
||||||
proxy_request_buffering off;<br>
|
proxy_request_buffering off;<br>
|
||||||
proxy_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_pass http://localhost:7156;<br>
|
||||||
}<br>
|
}<br>
|
||||||
}
|
}
|
||||||
|
@ -1458,7 +1449,6 @@
|
||||||
</p>
|
</p>
|
||||||
<div class="shell">
|
<div class="shell">
|
||||||
ln -s /etc/nginx/sites-available/YOUR_DOMAIN /etc/nginx/sites-enabled/<br>
|
ln -s /etc/nginx/sites-available/YOUR_DOMAIN /etc/nginx/sites-enabled/<br>
|
||||||
mkdir /var/www/cache
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="intro">
|
<p class="intro">
|
||||||
|
|
Loading…
Reference in New Issue