How to configure nginx to enable kinda 'file browser' mode?

前端 未结 6 918
眼角桃花
眼角桃花 2020-12-07 14:48

Once I\'ve seen this before when I type a URL http://test.com/test/, instead of give me a html page, it gives me a \'file browser\' like interface to browse all

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-07 14:59

    Just add this section to server, just before the location / {

    location /your/folder/to/browse/ {
            autoindex on;
    }
    

提交回复
热议问题