mirror of
https://github.com/hazemKrimi/touch-programming.git
synced 2026-05-01 18:20:26 +00:00
31 lines
766 B
Nginx Configuration File
31 lines
766 B
Nginx Configuration File
server {
|
|
server_name touch-programming.hazemkrimi.tech;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
root /var/www/touch-programming.hazemkrimi.tech/public;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /assets/ {
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location ~* \.(?:css|js|ico|ttf|png|svg|webm) {
|
|
expires 1M;
|
|
access_log off;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:5000/;
|
|
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_buffering off;
|
|
proxy_cache_bypass $http_upgrade;
|
|
proxy_http_version 1.1;
|
|
}
|
|
}
|