mirror of
https://github.com/hassio-addons/addon-tasmoadmin.git
synced 2025-05-04 11:01:27 +00:00
46 lines
1.4 KiB
Nginx Configuration File
Executable file
46 lines
1.4 KiB
Nginx Configuration File
Executable file
worker_processes 1;
|
|
pid /var/run/nginx.pid;
|
|
user nginx nginx;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
server {
|
|
server_name hassio.local;
|
|
listen 9541 default_server;
|
|
listen [::]:9541 default_server;
|
|
root /var/www/sonweb/;
|
|
index index.php;
|
|
|
|
location ~ .php$ {
|
|
fastcgi_pass 127.0.0.1:9001;
|
|
fastcgi_read_timeout 900;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
include fastcgi_params;
|
|
}
|
|
|
|
location /data/ {
|
|
deny all;
|
|
}
|
|
|
|
rewrite ^/login$ /login.php last;
|
|
rewrite ^/logout$ /login.php?logout=logout last;
|
|
rewrite ^/doAjaxAll$ /index.php?doAjaxAll=doAjaxAll last;
|
|
rewrite ^/doAjax$ /index.php?doAjax=doAjax last;
|
|
rewrite "/([a-z]{2})/" /index.php?lang=$1 last;
|
|
rewrite ^/([a-zA-Z_]+)/([a-zA-Z_]+)/([0-9_]+)/?$ /index.php?page=$1&action=$2&device_id=$3;
|
|
rewrite ^/([a-zA-Z_]+)/(force)/?$ /index.php?page=$1&force=1;
|
|
rewrite ^/([a-zA-Z_]+)/([a-zA-Z_]+)/?$ /index.php?page=$1&action=$2;
|
|
rewrite ^/([a-zA-Z_]+)/([0-9]+)/?$ /index.php?page=$1&device_id=$2;
|
|
rewrite ^/([a-zA-Z_]+)/?$ /index.php?page=$1;
|
|
}
|
|
}
|