Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. http {
  2. gzip on;
  3. gzip_http_version 1.0;
  4. gzip_proxied any;
  5. # other ngx_http_gzip_module directives...
  6.  
  7. server {
  8. # proxy configuration
  9.  
  10. location ^~ /assets/ {
  11. gzip_static on;
  12. expires max;
  13. add_header Cache-Control public;
  14. # root is inherited
  15. try_files $uri =404;
  16. error_page 404 /404.html;
  17. }
  18. }
  19. }
  20.  
  21. /assets/application-a45d6...e2593.css # dummy content
  22. /assets/application-a45d6...e2593.css.gz # real CSS
  23.  
  24. location ~ .txt$ {
  25. gzip_static on;
  26. gunzip on;
  27. }
  28.  
  29. events {
  30. worker_connections 768;
  31. }
  32.  
  33. http {
  34. server {
  35. # Enable static gzip
  36. gzip_static on;
  37. gunzip on;
  38.  
  39. listen 8080 default_server;
  40. listen [::]:8080 default_server;
  41.  
  42. root /home/user/projects/project1/build;
  43.  
  44. location / {
  45. try_files $uri /index.html;
  46. }
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement