feat: change structure

This commit is contained in:
2025-07-22 12:51:53 +02:00
parent 070dfa2764
commit 8f5032e531
38 changed files with 432 additions and 279 deletions

43
api/nginx.conf Normal file
View File

@ -0,0 +1,43 @@
server {
listen 80;
server_name *.lxdapp.local lxdapp.local;
root /var/www/html/lxd-app; # Adjust this to your Slim project's public folder
index index.php index.html index.htm;
# Reverse proxy to Vue.js for /app/ route
location ^~ /app/ {
proxy_pass http://127.0.0.1:3000/app/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# rewrite ^/app/(/.*)$ $1 break;
}
# Handle PHP Slim
location / {
# try_files $uri $uri/ /index.php?$query_string;
try_files $uri /index.php?$query_string;
}
# Pass PHP scripts to PHP-FPM
#location ~ \.php$ {
location = /index.php {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
include fastcgi_params;
}
# Static file optimization (optional)
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|otf)$ {
expires 30d;
access_log off;
}
error_log /var/log/nginx/tutorial_error.log;
access_log /var/log/nginx/tutorial_access.log;
}