Skip to content

🐳 Dockerized Nginx with modules "more_set_headers", "ngx_pagespeed" and "accept-language"

License

Notifications You must be signed in to change notification settings

emazzotta/docker-nginx-lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status License Docker Pulls

Docker Nginx

A Docker project for a recent version of the Nginx webserver and the module more_set_headers to specify custom headers such as a server name like 1337-server instead of nginx or apache. Another module this nginx build contains is Google's ngx_pagespeed module

Usage

docker run -v <my_conf_dir>:/etc/nginx/conf.d -v /var/ngx_pagespeed_cache -p 80:80 emazzotta/docker-nginx-lua

Note

While this project is called "docker-nginx-lua" I've dropped the support for LuaJit, see #3

Examples

More Set Headers

http {
    ...
    more_set_headers 'Server: 1337-server';
    ...
}

Accept Language Module

server {   
    ...
    location ~ / {
        set_from_accept_language $lang en de;
        if ( $request_uri ~ ^/$  ) {
            rewrite ^/$ /$lang redirect;
            break;
        }
    }
    ...
}

Pagespeed

server {
    ...
    pagespeed on;
    pagespeed FileCachePath /var/cache/nginx;
    pagespeed XHeaderValue "Pagespeed";
    pagespeed RewriteLevel CoreFilters;
    ...
}

Author

Emanuele Mazzotta

License

FOSSA Status

About

🐳 Dockerized Nginx with modules "more_set_headers", "ngx_pagespeed" and "accept-language"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published