Nextcloud version (eg, 12.0.2): 13.0.0.10 (RC1)
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Nginx (latest in Ubuntu 16.04)
PHP version (eg, 7.1): 7.0
The issue you are facing:
Steps to replicate it:
- Try to install Nextcloud in a subdirectory following this tutorial: https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html#nextcloud-in-a-subdir-of-nginx
- Also have other services running in the root directory and other parallel sub directories
- Notice that loading of .js .css images and various other files fail in the other services due to Nginx rewrite rules
The output of your Nextcloud log in Admin > Logging:
Error index Exception: The requested uri(/otherservice/static/jquery.js) cannot be processed by the script '/cloud/index.php')
Lots of those errors. And Nextcloud asks the user to log in again if you open the other services.
I assume this is related to these rewrite rules that don’t descriminate with subfolder the files are in:
location ~ \.(?:css|js|woff|svg|gif)$ {
try_files $uri /nextcloud/index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=15778463";
access_log off;
}
and
location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /nextcloud/index.php$uri$is_args$args;
# Optional: Don't log access to other assets
access_log off;
}
Anyone got a hint how that can’t be made to work? I am relatively new to nginx and php, so please give sufficient detail. I already tried googling quite a bit, but I can’t seem to figure it out. In Apache there are .htaccess files to solve such issue I guess.
Another unrelated thing: If I don’t remove this part
location ~ ^/nextcloud/(?:updater|ocs-provider)(?:$|/) {
try_files $uri/ =404;
index index.php;
}
My new Nextcloud doesn’t seem to save any settings or give notifications etc. Very strange…