-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
2,224 additions
and
1,943 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Directory /var/www/tasmoadmin/> | ||
Require all granted | ||
AllowOverride All | ||
Options FollowSymLinks | ||
</Directory> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
$HTTP["url"] =~ "^/tasmoadmin($|/)" { | ||
# Restrict direct access to .htaccess and data directory | ||
$HTTP["url"] =~ "^/tasmoadmin/(\.|data)" { | ||
url.access-deny = ("") | ||
} | ||
|
||
# TasmoAdmin URL rewrite, required for sync clients | ||
url.rewrite-if-not-file = ( | ||
"^/tasmoadmin/doAjax$" => "/tasmoadmin/index.php?doAjax=doAjax", | ||
"^/tasmoadmin/doAjaxAll$" => "/tasmoadmin/index.php?doAjaxAll=doAjaxAll", | ||
"^/tasmoadmin/login$" => "/tasmoadmin/login.php", | ||
"^/tasmoadmin/logout$" => "/tasmoadmin/login.php?logout=logout", | ||
"^/tasmoadmin/([a-zA-Z_]+)/([a-zA-Z_]+)/([0-9_]+)$" => "/tasmoadmin/index.php?page=$1&action=$2&device_id=$3", | ||
"^/tasmoadmin/([a-zA-Z_]+)/(force)$" => "/tasmoadmin/index.php?page=$1&force=1", | ||
"^/tasmoadmin/([a-zA-Z_]+)/([a-zA-Z_]+)$" => "/tasmoadmin/index.php?page=$1&action=$2", | ||
"^/tasmoadmin/([a-zA-Z_]+)/([0-9]+)$" => "/tasmoadmin/index.php?page=$1&device_id=$2", | ||
"^/tasmoadmin/([a-zA-Z_]+)$" => "/tasmoadmin/index.php?page=$1" | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
location ^~ /tasmoadmin { | ||
location /tasmoadmin/firmwares { | ||
} | ||
|
||
# Deny access to .htaccess and data dir | ||
location ~ ^/tasmoadmin/(?:\.|data) { | ||
deny all; | ||
} | ||
|
||
location ~* \.php$ { | ||
fastcgi_pass php; | ||
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 ~* \.(css|js|gif||jpe?g|png|json|cache\.json)$ { | ||
} | ||
|
||
location /tasmoadmin { | ||
rewrite ^/tasmoadmin/login$ /tasmoadmin/login.php last; | ||
rewrite ^/tasmoadmin/logout$ /tasmoadmin/login.php?logout=logout last; | ||
rewrite ^/tasmoadmin/doAjaxAll$ /tasmoadmin/index.php?doAjaxAll=doAjaxAll last; | ||
rewrite ^/tasmoadmin/doAjax$ /tasmoadmin/index.php?doAjax=doAjax last; | ||
rewrite "/tasmoadmin/([a-z]{2})/" /tasmoadmin/index.php?lang=$1 last; | ||
rewrite ^/tasmoadmin/([a-zA-Z_]+)/([a-zA-Z_]+)/([0-9_]+)/?$ /tasmoadmin/index.php?page=$1&action=$2&device_id=$3; | ||
rewrite ^/tasmoadmin/([a-zA-Z_]+)/(force)/?$ /tasmoadmin/index.php?page=$1&force=1; | ||
rewrite ^/tasmoadmin/([a-zA-Z_]+)/([a-zA-Z_]+)/?$ /tasmoadmin/index.php?page=$1&action=$2; | ||
rewrite ^/tasmoadmin/([a-zA-Z_]+)/([0-9]+)/?$ /tasmoadmin/index.php?page=$1&device_id=$2; | ||
rewrite ^/tasmoadmin/([a-zA-Z_]+)/?$ /tasmoadmin/index.php?page=$1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,4 +92,4 @@ location ^~ /owncloud { | |
# Optional: Don't log access to other assets | ||
access_log off; | ||
} | ||
} | ||
} |
Oops, something went wrong.