37 lines
870 B
Nginx Configuration File
37 lines
870 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name forms.collinasystems.com.mx;
|
|
charset utf-8;
|
|
client_max_body_size 10M;
|
|
|
|
# API -> FastAPI
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:8000;
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# Panel admin
|
|
location = /login {
|
|
root /usr/share/nginx/html;
|
|
try_files /login.html =404;
|
|
}
|
|
|
|
location = /dashboard {
|
|
root /usr/share/nginx/html;
|
|
try_files /dashboard.html =404;
|
|
}
|
|
|
|
# Formularios públicos subidos por el usuario
|
|
location / {
|
|
root /data/forms;
|
|
try_files $uri $uri/ $uri/index.html @fallback;
|
|
}
|
|
|
|
location @fallback {
|
|
return 302 /dashboard;
|
|
}
|
|
}
|