Skip to content

Instantly share code, notes, and snippets.

@zclfly
Forked from hydra35/nginx.conf
Created April 21, 2013 01:18

Revisions

  1. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -15,3 +15,7 @@ http {

    # 3. nginx -t && /etc/init.d/nginx reload

    Notes:

    1. Does not work on Firefox

  2. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 5 additions and 4 deletions.
    9 changes: 5 additions & 4 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,8 @@
    # 1. Make sure you have nginx sub module:
    # 1. Make sure you have nginx sub module compiled in
    # nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module'

    # 2. add two directives below at HTTP level

    # 3. nginx -t && /etc/init.d/nginx reload

    # nginx.conf
    http {
    # ......
    @@ -13,4 +11,7 @@ http {
    sub_filter_once on;

    # ......
    }
    }

    # 3. nginx -t && /etc/init.d/nginx reload

  3. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # 1. Make sure you have nginx sub module:
    # nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module'

    # 2. add two directives at HTTP level
    # 2. add two directives below at HTTP level

    # 3. nginx -t && /etc/init.d/nginx reload

  4. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,10 @@
    # 1. Make sure you have nginx sub module:
    # nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module'

    # 2. add two directives at HTTP level

    # 3. nginx -t && /etc/init.d/nginx reload

    # nginx.conf
    http {
    # ......
  5. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion nginx.conf
    Original file line number Diff line number Diff line change
    @@ -5,5 +5,5 @@ http {
    sub_filter '</head>' '<style type="text/css">html{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); } img { _filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=0); -webkit-filter: grayscale(100%); } </style>';
    sub_filter_once on;

    # ......
    # ......
    }
  6. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    # nginx.conf
    http {
    # ......

    sub_filter '</head>' '<style type="text/css">html{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); } img { _filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=0); -webkit-filter: grayscale(100%); } </style>';
    sub_filter_once on;

    # ......
    }
  7. @hydra35 hydra35 revised this gist Apr 20, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    # nginx.conf
    http {
    sub_filter '</head>' '<style type="text/css">html{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); } img { _filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=0); -webkit-filter: grayscale(100%); } </style>';
    sub_filter_once on;
  8. @hydra35 hydra35 created this gist Apr 20, 2013.
    4 changes: 4 additions & 0 deletions nginx.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    http {
    sub_filter '</head>' '<style type="text/css">html{ filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); } img { _filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=0); -webkit-filter: grayscale(100%); } </style>';
    sub_filter_once on;
    }