I’m trying to configure nginx so that, when connecting to https://aaabbb.nohost.me/sharedfolder, the user sees a classic “Index of” page with the files contained in /var/www/html/sharedfolder.
Unfortunately, I’m completely new to nginx, and more generally to server administration. I’m trying to follow the nginx docs, but clearly I’m doing something wrong and I cant’ understand what.
I tried creating a sharedfolder.conf file within /etc/nginx/conf.d/default.d with this content:
location /sharedfolder/ {
try_files $uri $uri/ =404;
alias /var/www/html/sharedfolder/;
}
This file should be included in the server directive of /etc/nginx/conf.d/yunohost_admin.conf, which itself is included in the http directive of /etc/nginx/nginx.conf.
To avoid permission troubles, I set permissions for the shared folder to 777.
The problem is that, when I try connecting to https://aaabbb.nohost.me/sharedfolder, I still get sent back to the Yunohost authentication panel.
Apart from making this work, I also have another, more important question. Are there security issues in setting up public folders like this? I realize of course that the content of the folder would be public, since that’s my goal, but I’m wondering if this exposes the server to other vulnerabilities.
I’m assuming that My Webapp (which I can’t find in the application list) is the same as Custom Webapp. I just tried it and it does exactly what I need.
Thank you for the PSA about permissions, as well. I guess I’m exactly the kind of user for which “auto-configurating” applications are important :D.
Sorry, my confusion once again: that’s exactly the app I installed, but I was identifying it based on the name that appears on the administration panel (instead of the package name). I didn’t realise that there used to be an application properly named “custom webapp”.
Fortunately, no need to change anything! Apart from that folder that I set with 777 permissions, ugh!
Thanks again!