Sign inSign up

gmmurali/nginx-ssl

By gmmurali

•Updated over 9 years ago

Ubuntu nginx-ssl created on AWS EC2 on 2017-03-21

Image
0

2.2K

gmmurali/nginx-ssl repository overview

[root@ip-172-31-33-219 ubuntu-nginx]# cat Dockerfile FROM ubuntu:latest COPY ./nginx.list /etc/apt/sources.list.d/ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62 && apt-get update && apt-get install -y nginx && apt-get clean && rm -rf /var/lib/apt/lists/* COPY ./localhost.crt ./localhost.key ./default.conf /etc/nginx/conf.d/ COPY ./index.html /usr/share/nginx/html/ EXPOSE 8080 443

⁠CMD ["/usr/sbin/nginx", "-g", "daemon off;"] [root@ip-172-31-33-219 ubuntu-nginx]#

⁠[root@ip-172-31-33-219 ubuntu-nginx]# ls -ltr total 28 -rw-r--r--. 1 root root 106 Mar 21 18:49 nginx.list -rw-------. 1 root root 1586 Mar 21 18:54 localhost.crt -rw-------. 1 root root 1679 Mar 21 18:54 localhost.key -rw-r--r--. 1 root root 1848 Mar 21 18:55 default.conf -rw-r--r--. 1 root root 627 Mar 21 19:19 index.html -rw-r--r--. 1 root root 409 Mar 21 19:25 Dockerfile.daemon.off -rw-r--r--. 1 root root 409 Mar 21 19:27 Dockerfile [root@ip-172-31-33-219 ubuntu-nginx]#

⁠[root@ip-172-31-33-219 ubuntu-nginx]# egrep -v '^$|^#|. *#' default.conf server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } server { listen 443; root /usr/share/nginx/html; index index.php index.html index.htm; server_name example.com; ssl on; ssl_certificate /etc/nginx/conf.d/localhost.crt; ssl_certificate_key /etc/nginx/conf.d/localhost.key; location / { try_files $uri $uri/ /index.html; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ .php$ { try_files $uri =404; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } [root@ip-172-31-33-219 ubuntu-nginx]#

Tag summary

Content type

Image

Digest

Size

51 MB

Last updated

over 9 years ago

docker pull gmmurali/nginx-ssl