Directory listing not working


I need to be able to allow links to files in an upload directory on a Wordpress install. I have added the following into a .conf file in the conf/nginx directory in the site folder, but it does not work:

_location /var/www/ {_

_ autoindex on;_ _ }_

Any suggestions?

You don’t need “_” around the config parameter. The syntax will be:

     autoindex on; }```

Just that should work.

I don’t actually have the underscores - these were added by the Forum when I cut/paste.

So my syntax looks the same as what you suggest, but it just doesn’t work

Add a tilde(~) after location. So that the new line looks like:

location ~ your/URL/path { autoindex on; }

Sometimes you gotta edit your vhost file (ee site edit and move the line that includes your custom rules above other lines.

Note that any ee site update command will revert this edition, you’ll need to redo it.

Thanks, guys. I’ve now tried all your suggestions, but keep getting a 403 error