Fixes and improvements

This commit is contained in:
2025-04-10 19:10:57 +01:00
parent 9f715ac17a
commit 660fb0c642
5 changed files with 28 additions and 36 deletions
+23 -30
View File
@@ -1,37 +1,30 @@
events {}
server {
server_name touch-programming.hazemkrimi.tech;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
root /var/www/touch-programming.hazemkrimi.tech/public;
server {
listen 80;
server_name touch-programming.hazemkrimi.tech;
access_log /var/log/nginx/access.log;
root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html;
}
location / {
try_files $uri $uri/ /index.html;
}
location /assets/ {
try_files $uri =404;
}
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 ~* \.(?: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;
}
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;
}
}
+2 -2
View File
@@ -2,8 +2,8 @@
Description=Touch Programming API Service
[Service]
ExecStart=/usr/local/bin/touch-programming-api
WorkingDirectory=/usr/local/bin
ExecStart=/var/www/touch-programming.hazemkrimi.tech/api/executable
WorkingDirectory=/var/www/touch-programming.hazemkrimi.tech/api
User=hazem
Group=hazem
LimitNOFILE=65536