change_url fails
Closed this issue · 2 comments
tituspijean commented
OK. What was working while testing fails in master. Great.
While trying to change the url of a forum under /forum
, to /flarim
:
location "/forum/" is outside location "/flarim" in /etc/nginx/conf.d/ynh.local.d/flarum.conf:12
In flarum.conf
, location
is correctly altered, but the rest is not:
location ^~ /flarim {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
alias /var/www/flarum/;
try_files $uri $uri/ /index.php?$query_string;
index /forum/index.php;
# Bug in Nginx with locations and aliases (see http://stackoverflow.com/a/35102259 )
location /forum/ { try_files $uri $uri/ /forum/forum/index.php?$query_string; }
location /forum/api { try_files $uri $uri/ /forum/forum/api.php?$query_string; }
location /forum/admin { try_files $uri $uri/ /forum/forum/admin.php?$query_string; }
location /forum/flarum/ {
deny all;
return 404;
}
tituspijean commented
flarum.conf
has not been restored after this failed change. nginx
stays down, manual correction is needed.
tituspijean commented
Mea culpa, I tested this on two altered apps, used during development of this feature. No problem using a freshly installed app.