cambios na web raíz e config para nginx

This commit is contained in:
serxoz 2022-10-25 09:34:11 +02:00
parent 18443b4f86
commit b0b095b763
2 changed files with 39 additions and 3 deletions

36
nginx.conf Normal file
View File

@ -0,0 +1,36 @@
server {
if ($host = sh4r.in) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name sh4r.in;
return 301 https://sh4r.in/;
}
server{
listen 443 ssl http2;
server_name sh4r.in;
client_max_body_size 128M;
location / {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5:!RC4;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/letsencrypt/live/sh4r.in/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sh4r.in/privkey.pem;
}

View File

@ -11,11 +11,11 @@ SH4R.IN
HTTP POST files here: HTTP POST files here:
curl -F'file=@yourfile.png' {} curl -F'file=@yourfile.png' {}
You can also POST remote URLs:
curl -F'url=http://example.com/image.jpg' {}
File URLs are valid for aproximately 5 days. File URLs are valid for aproximately 5 days.
Maximum file size: 128 M
TERMS OF SERVICE TERMS OF SERVICE
---------------- ----------------
@ -41,6 +41,6 @@ UPLOAD DIRECTLY
<input class=\"form-control\" type=\"submit\" value=\"send\"> <input class=\"form-control\" type=\"submit\" value=\"send\">
</form> </form>
", ",
url, url, url); url, url);
Html(html).into_response() Html(html).into_response()
} }