Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http {
- gzip on;
- gzip_http_version 1.0;
- gzip_proxied any;
- # other ngx_http_gzip_module directives...
- server {
- # proxy configuration
- location ^~ /assets/ {
- gzip_static on;
- expires max;
- add_header Cache-Control public;
- # root is inherited
- try_files $uri =404;
- error_page 404 /404.html;
- }
- }
- }
- /assets/application-a45d6...e2593.css # dummy content
- /assets/application-a45d6...e2593.css.gz # real CSS
- location ~ .txt$ {
- gzip_static on;
- gunzip on;
- }
- events {
- worker_connections 768;
- }
- http {
- server {
- # Enable static gzip
- gzip_static on;
- gunzip on;
- listen 8080 default_server;
- listen [::]:8080 default_server;
- root /home/user/projects/project1/build;
- location / {
- try_files $uri /index.html;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement