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
docker run -v <my_conf_dir>:/etc/nginx/conf.d -v /var/ngx_pagespeed_cache -p 80:80 emazzotta/docker-nginx-lua
While this project is called "docker-nginx-lua" I've dropped the support for LuaJit, see #3
http {
...
more_set_headers 'Server: 1337-server';
...
}
server {
...
location ~ / {
set_from_accept_language $lang en de;
if ( $request_uri ~ ^/$ ) {
rewrite ^/$ /$lang redirect;
break;
}
}
...
}
server {
...
pagespeed on;
pagespeed FileCachePath /var/cache/nginx;
pagespeed XHeaderValue "Pagespeed";
pagespeed RewriteLevel CoreFilters;
...
}