default.conf 716 B

12345678910111213141516171819202122232425262728
  1. # from gis project
  2. server {
  3. listen 80;
  4. listen [::]:80;
  5. server_name localhost;
  6. set $root '/usr/share/nginx/html';
  7. root $root;
  8. location / {
  9. index index.html index.htm;
  10. try_files $uri $uri/ /gis/index.html;
  11. add_header Access-Control-Allow-Origin *;
  12. autoindex off; #开启nginx目录浏览功能
  13. autoindex_exact_size off; #文件大小从KB开始显示
  14. autoindex_localtime on; #显示文件修改时间为服务器本地时间
  15. }
  16. location ~ /.well-known {
  17. allow all;
  18. autoindex on;
  19. autoindex_exact_size off;
  20. autoindex_localtime on;
  21. }
  22. #location ~ /\.ht {
  23. # deny all;
  24. #}
  25. }