Comment to UNA nginx rewrite rules
-
So I'm having a problem with this. It does not seem to work at all, and I can't understand why. It's the only thing I'm having trouble with. I would love any help anyone can give me.
Here's a link to my config: https: // pastebin . com/EBkuBNKm
(remove the spaces, as my membership won't allow me to post links)
-
Path to UNA means path to UNA in query string, for example
- if UNA is installed at "https://example.com/" then the path would be "/"
- if UNA is installed at "https://example.com/my/app/" then the path would be "/my/app/"
Please replace the following in you nginx config
location / { index index.html index.htm index.php; rewrite "^/var/www/tavrn.social/page/(.*)$" /var/www/tavrn.social//page.php?i=$1 last; rewrite "^/var/www/tavrn.social/m/(.*)$" /var/www/tavrn.social/modules/index.php?r=$1 last; rewrite "^/var/www/tavrn.social/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /var/www/tavrn.social/storage.php?o=$1&f=$2 last; if (!-e $request_filename ) { rewrite ^/var/www/tavrn.social/(.+)$ /var/www/tavrn.social/r.php?_q=$1 last; break; } } # deny access to hidden files location ~ /var/www/tavrn.social/(\.ht|\.git) { deny all; } # deny access to specific folders location ~ ^/var/www/tavrn.social/(cache/|storage/|logs/|plugins/|tmp/) { deny all; }
with the following
location / { index index.html index.htm index.php; rewrite "^/page/(.*)$" /page.php?i=$1 last; rewrite "^/m/(.*)$" /modules/index.php?r=$1 last; rewrite "^/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /storage.php?o=$1&f=$2 last; if (!-e $request_filename) { rewrite ^/(.+)$ /r.php?_q=$1 last; break; } } # deny access to hidden files location ~ /(\.ht|\.git) { deny all; } # deny access to specific folders location ~ ^/(cache/|storage/|logs/|plugins/|tmp/) { deny all; }
-
-
I guess you need to apply this solution now: https://unacms.com/cmts-view/1nzuaie?sys=bx_forum&cmt_id=48562
-