Skip to content

Instantly share code, notes, and snippets.

@xiongnemo
Created January 24, 2024 07:34
Show Gist options
  • Save xiongnemo/3f458c63d77638ec2558584762c50405 to your computer and use it in GitHub Desktop.
Save xiongnemo/3f458c63d77638ec2558584762c50405 to your computer and use it in GitHub Desktop.
Nginx autolist module + json
# docker run -p 65535:80 -v <?>:/nginx -v nginx-autolist.conf:/etc/nginx/conf.d/autolist.conf nginx
autoindex on;
autoindex_format json;
server {
listen 80;
server_name 127.0.0.1;
root /nginx;
location ^~ / {
autoindex on;
autoindex_format json;
}
error_log /var/log/nginx/app.error.log;
access_log /var/log/nginx/app.access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment