Public | Automated Build

Last pushed: a day ago
Short Description
This image is based on alang/nginx adding the capabilities to act as a reverse proxy.
Full Description

Supported tags

  • latest

About this image

This image is based on alang/nginx
which makes minor modifications to the official nginx image.

In this image nginx is configured to serve static assets from /var/www/static (volume) as well as
forward request to another server (it does act as a reverse proxy).

Nginx will respond to all request against the URL path /static.
If no such asset is found the request will be forwarded.

All other requests will be forwarded to the server with the DNS name web on the port 8000.

Requests which are forwarded to contain the X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Proto header.

The image does export port 80.

It has a volume defined to serve static resources at /var/www/static.

How to use this image

hosting simple static content + link to another server

docker run -v /some/content:/var/www/static:ro --link web alang/nginx_rproxy

complex configuration

Provide additional configuration by adding files with the .conf extension to /etc/nginx/conf.d/, /etc/nginx/server/, /etc/nginx/static/ or /etc/nginx/proxy/.

# ...
# <- /etc/nginx/conf.d/*.conf goes here
server {
    # ...
    # <- /etc/nginx/server/*.conf goes here
    location / {
        # ...
        # <- /etc/nginx/proxy/*.conf goes here
    }
    location /static {
        # ...
        # <- /etc/nginx/static/*.conf goes here
    }
}

For example:

FROM alang/nginx_rproxy
COPY static_caching.conf /etc/nginx/static/

User Feedback

Issues

If you have any problems with or questions about this image, please contact me through a GitHub issue.

Contributing

You are invited to contribute new features, fixes, or updates, large or small.
Please send me a pull request.

Docker Pull Command
Owner
alang

Comments (0)