nginx.conf 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. worker_processes 1;
  2. events {
  3. worker_connections 1024;
  4. }
  5. error_log nginx_main_error.log info;
  6. pid nginx_user.pid;
  7. daemon off;
  8. http {
  9. access_log nginx_access.log;
  10. error_log nginx_error.log info;
  11. include /etc/nginx/mime.types;
  12. default_type application/octet-stream;
  13. sendfile on;
  14. server {
  15. # listen 8080 ssl;
  16. listen 8081;
  17. server_name localhost;
  18. gzip on;
  19. # Enable compression for .wasm, .js and .txt files (used for the runtime chunks)
  20. gzip_types application/javascript application/wasm text/plain application/octet-stream;
  21. charset utf-8;
  22. # ssl_certificate nginx.crt;
  23. # ssl_certificate_key nginx.key;
  24. location / {
  25. root build;
  26. autoindex on;
  27. index index.html index.htm;
  28. add_header 'Cross-Origin-Opener-Policy' 'same-origin' always;
  29. add_header 'Cross-Origin-Embedder-Policy' 'require-corp' always;
  30. add_header 'Cross-Origin-Resource-Policy' 'cross-origin' always;
  31. try_files $uri /index.html;
  32. }
  33. }
  34. }