Last active
          September 1, 2017 14:55 
        
      - 
      
- 
        Save nikkanetiya/fffa68ea0b7d2ea9f08410b3057c71e3 to your computer and use it in GitHub Desktop. 
    Enable Gzip in Nginx Server
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | cat > /etc/nginx/conf.d/gzip.conf << EOF | |
| gzip_comp_level 5; | |
| gzip_min_length 256; | |
| gzip_proxied any; | |
| gzip_vary on; | |
| gzip_types | |
| application/atom+xml | |
| application/javascript | |
| application/json | |
| application/rss+xml | |
| application/vnd.ms-fontobject | |
| application/x-font-ttf | |
| application/x-web-app-manifest+json | |
| application/xhtml+xml | |
| application/xml | |
| font/opentype | |
| image/svg+xml | |
| image/x-icon | |
| text/css | |
| text/plain | |
| text/x-component; | |
| EOF | |
| service nginx restart | |
| service nginx reload | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment