Commit 3761c3a5 authored by caiyanming's avatar caiyanming

refractor tengine to raw 80

Change-Id: Ifc40418de919aafae7ca7ae78d71e35c2398fe85
parent 5e2d2ce5
...@@ -21,19 +21,13 @@ COPY sources.list /etc/apt/sources.list ...@@ -21,19 +21,13 @@ COPY sources.list /etc/apt/sources.list
ADD tengine-2.2.1-bin.tar.gz /usr/local ADD tengine-2.2.1-bin.tar.gz /usr/local
RUN apt-get update && apt-get install -y openssl libjemalloc-dev libpcre3 \ RUN apt-get update && apt-get install -y openssl libjemalloc-dev libpcre3 \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/*
&& ln -sf /dev/stdout /usr/local/nginx/logs/access.log \
&& ln -sf /dev/stderr /usr/local/nginx/logs/error.log
COPY schbrain.com.key /usr/local/nginx/conf/schbrain.com.key
COPY schbrain.com.pem /usr/local/nginx/conf/schbrain.com.pem
COPY nginx.conf /usr/local/nginx/conf/nginx.conf COPY nginx.conf /usr/local/nginx/conf/nginx.conf
ENV NGINX_HOME /usr/local/nginx ENV NGINX_HOME /usr/local/nginx
ENV PATH $PATH:$NGINX_HOME/sbin ENV PATH $PATH:$NGINX_HOME/sbin
EXPOSE 80 EXPOSE 80
EXPOSE 443
CMD [ "nginx", "-g", "daemon off;" ] CMD [ "nginx", "-g", "daemon off;" ]
...@@ -24,9 +24,9 @@ http { ...@@ -24,9 +24,9 @@ http {
include mime.types; include mime.types;
default_type application/octet-stream; default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' log_format main '$remote_addr - $remote_user [$time_local] "$request" $http_host '
# '$status $body_bytes_sent "$http_referer" ' '$status $request_length $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; '"$http_user_agent" $request_time $upstream_response_time';
#access_log logs/access.log main; #access_log logs/access.log main;
...@@ -36,49 +36,19 @@ http { ...@@ -36,49 +36,19 @@ http {
#keepalive_timeout 0; #keepalive_timeout 0;
keepalive_timeout 65; keepalive_timeout 65;
client_max_body_size 5M;
client_body_buffer_size 128k;
#gzip on; #gzip on;
server { server {
listen 80; listen 80 default;
server_name www.schbrain.com;
#charset koi8-r; #charset koi8-r;
#access_log logs/host.access.log main; #access_log logs/host.access.log main;
location / { location / {
root /var/html_root_80; root /var/app;
index index.html;
}
}
# HTTPS server
server {
listen 443 ssl;
server_name www.schbrain.com;
ssl_certificate schbrain.com.pem;
ssl_certificate_key schbrain.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
root /var/html_root;
index index.html; index index.html;
} }
location /api {
proxy_pass http://localhost:8080;
}
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment