Commit 8f6cde84 authored by Richard Torenvliet's avatar Richard Torenvliet

Add example file for nginx config for remote server

parent 12d33735
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream websocket {
server localhost:6930;
}
server {
error_log /var/log/nginx/richard.kompiler.org_error.log debug;
listen 443 ssl;
server_name richard.kompiler.org;
ssl on;
ssl_certificate /etc/letsencrypt/live/kompiler.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/kompiler.org/privkey.pem;
location / {
root /var/www/richard.kompiler.org/;
}
location /face-reconstruction/ {
root /var/www/richard.kompiler.org/;
try_files $uri $uri/ /face-reconstruction/index.html;
}
location /api/v1 {
proxy_pass http://localhost:6930;
proxy_set_header X-Forwarded-Ssl on;
include /etc/nginx/proxy_params;
client_max_body_size 16g;
client_body_in_file_only clean;
client_body_buffer_size 32K;
}
location ~ ^/(data|docs)/ {
proxy_pass http://localhost:6930;
proxy_set_header X-Forwarded-Ssl on;
include /etc/nginx/proxy_params;
client_max_body_size 16g;
client_body_in_file_only clean;
client_body_buffer_size 32K;
}
location /reconstruction {
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment