At the time of this writing Azure is in Preview for App Service running Linux. There are some features missing and this project hopes to provide a stop gap until features are released and available.
Azure App Service for Linux (AASL) does not yet support running static HTML web sites on Nginx. As such, there was a need to create a Docker image to support my required configuration. Additionally, on Azure it's not necessary to configure SSL/443 or http2 as this is done automatically upstream from the AASL.
- Running latest Nginx version
- Serving static html sites
- Serving Linux file defaults not Windows
- Configured for SSL through http to https redirection.
- 1 day caching for core asset file types
Installation, configuration, and understanding of the latest Docker
- Fetch and clone the source repository.
$ git clone https://github.com/awentzel/azure-nginx-ssl.git
- Build with Docker
$ docker build -t azure-nginx .
- Running as Docker and listening to web traffic. This is useful to determine if there are any configuration or run-time errors.
$ docker run -p 80:80 azure-nginx
- Running as Docker with -d parameter to
$ docker run -p 80:80 -d azure-nginx
- Browsing the web site. You may want to comment out the redirect statement to test site is loading correctly. Otherwise, you'll be redirected to https and site will not load except on Azure.
$ curl http://localhost
- Review running containers on Docker
$ docker ps
- Find the unique "CONTAINER ID" from #1 above to use after the stop command.
$ docker stop 0dce4d4e5f4f
- Make edits and return to setp #2 for re-building and running Docker
A big thanks for giving inspriration and ideas on best way to organize, build, and run the solution.