Question
How to browse by web a folder under nginx environnement
Hi all,
i’ve created trough sftp another folder near my ghost folder in nginx environnment:
/var/www/ghost
/var/www/folderx
Ghost works find but i don’t find out how to acess the folderx trough http://myurl.tld/folderx
Used to an apache environment i don’t see how to do this under nginx.
Could you help ?
Thx
SPG
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Hi. Is the folder /var/www/ghost accessible trough myurl.tld or myurl.tld/ghost? What type of error message do you see when you try to access myurl.tld/folderx?
/var/www/ghost is accessible through myurl.tld.
When i try to access myurl.tld/folderx i get a 404 error.
I’ve tried to add
in my etc/nginx/sites-enabled/ghost file
and restarting ghost but it doesnt work
I think i’m getting somewhere now as i got a 403 Forbidden error now.
and with adding
location /folder/ {
alias /var/www/folder/;
autoindex on;
}
i can list the folder without being able to access its content…