Skip to content

Instantly share code, notes, and snippets.

@spdin
Created July 8, 2021 07:51
Show Gist options
  • Save spdin/526108082741272249f9152afce96738 to your computer and use it in GitHub Desktop.
Save spdin/526108082741272249f9152afce96738 to your computer and use it in GitHub Desktop.
NGINX setup
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
server_name _;
index index.html index.htm index.nginx-debian.html;
location / {
proxy_read_timeout 600s;
proxy_connect_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
client_max_body_size 10M;
proxy_pass http://127.0.0.1:8888/;
}
location /data/ {
autoindex on;
autoindex_exact_size off;
alias /home/yosua_surojo/hw-text-reading-engine/data/;
location ~* \.(jpg|txt|csv|pth|json)$ {
add_header 'Access-Control-Allow-Origin' '*';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment