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

前端 未结 6 932
眼角桃花
眼角桃花 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 15:02

    You need create /home/yozloy/html/test folder. Or you can use alias like below show:

    location /test {
        alias /home/yozloy/html/;
        autoindex on;
    }
    

提交回复
热议问题