Created
September 22, 2015 10:13
-
-
Save enjikaka/267eadced4c2fdf90769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:15.10 | |
MAINTAINER enjikaka | |
RUN apt-get update | |
# [Start] Install NGINX | |
## Install tools for nginx | |
RUN apt-get install -y nano wget dialog net-tools | |
## Install nginx | |
RUN apt-get install -y nginx | |
# [Finished] Install NGINX | |
# [Start] Configuration for nginx | |
## Remove the default conf | |
RUN rm -v /etc/nginx/nginx.conf | |
## Add new config | |
ADD nginx.conf /etc/nginx/ | |
# Append "daemon off;" to the beginning of the conf | |
RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
# [Finished] Configuration for nginx | |
EXPOSE 80 | |
CMD service nginx start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<strong>WordPress does not work</strong> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
events { worker_connections 1024; } | |
http { | |
sendfile on; | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_proxied any; | |
gzip_min_length 500; | |
gzip_disable "MSIE [1-6]\."; | |
gzip_types text/plain text/xml text/css | |
text/comma-separated-values | |
text/javascript | |
application/x-javascript | |
application/atom+xml; | |
# List of application servers | |
upstream app_servers { | |
server 127.0.0.1:8080; | |
} | |
# Configuration for the server | |
server { | |
# Running port | |
listen 80; | |
# Proxying the connections connections | |
location / { | |
proxy_pass http://app_servers; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Host $server_name; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment