69 lines
1.8 KiB
Nginx Configuration File
69 lines
1.8 KiB
Nginx Configuration File
worker_processes 2;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
map $http_referer $httpReferer {
|
|
default "$http_referer";
|
|
"" "(direct)";
|
|
}
|
|
map $http_user_agent $httpAgent {
|
|
default "$http_user_agent";
|
|
"" "Unknown";
|
|
}
|
|
log_format json escape=json '{'
|
|
'"time_local": "$time_local", '
|
|
'"remote_addr": "$remote_addr", '
|
|
'"request_uri": "$request_uri", '
|
|
'"status": "$status", '
|
|
'"http_referer": "$httpReferer", '
|
|
'"http_user_agent": "$httpAgent", '
|
|
'"server_name": "$server_name", '
|
|
'"request_time": "$request_time" '
|
|
'}';
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
server_name zaloha.alkator.cz;
|
|
|
|
access_log /var/log/nginx/access.log json;
|
|
error_log /var/log/nginx/error.log;
|
|
root /alkator/frontend/build;
|
|
|
|
location /api{
|
|
proxy_read_timeout 300;
|
|
proxy_pass http://api:8005;
|
|
}
|
|
location /api/upload_files{
|
|
client_max_body_size 100M;
|
|
proxy_pass http://api:8005;
|
|
}
|
|
location /admin {
|
|
proxy_pass http://api:8005;
|
|
}
|
|
location /static {
|
|
root /alkator;
|
|
}
|
|
location /photos {
|
|
root /alkator;
|
|
}
|
|
location /favicon.ico {
|
|
root /alkator;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/index.html =404;
|
|
}
|
|
|
|
}
|
|
} |