|
|
@@ -0,0 +1,101 @@
|
|
|
+
|
|
|
+upstream rungobackend {
|
|
|
+ server 127.0.0.1:28889;
|
|
|
+ keepalive 128;
|
|
|
+}
|
|
|
+
|
|
|
+server {
|
|
|
+ listen 80;
|
|
|
+ server_name api.d5ct.com api.d5c360.com;
|
|
|
+ #access_log /opt/apps/api.d5ct.com/go/gopath/src/api.com/logs/ngx_access.log main buffer=32k;
|
|
|
+ access_log /opt/apps/api.d5ct.com/go/gopath/src/api.com/logs/ngx_access.log main;
|
|
|
+ error_log /opt/apps/api.d5ct.com/go/gopath/src/api.com/logs/ngx_error.log;
|
|
|
+ location /report/ {
|
|
|
+ allow 14.21.232.69;
|
|
|
+ allow 183.31.159.239;
|
|
|
+ deny all;
|
|
|
+ alias /opt/apps/api.d5ct.com/go/gopath/src/api.com/logs/goaccess/html/;
|
|
|
+ }
|
|
|
+ location =/MP_verify_KQ21qJhiWk5g2Oh5.txt {
|
|
|
+ root /opt/apps/api.d5ct.com;
|
|
|
+ }
|
|
|
+ location =/MP_verify_e6SjzkLxNVrCCXwQ.txt {
|
|
|
+ root /opt/apps/api.d5ct.com;
|
|
|
+ }
|
|
|
+ location =/MP_verify_oA3QuVJuxLN0Z3D2.txt {
|
|
|
+ root /opt/apps/api.d5ct.com;
|
|
|
+ }
|
|
|
+ location =/3mft7ivXXx.txt {
|
|
|
+ root /opt/apps/api.d5ct.com;
|
|
|
+ }
|
|
|
+ location =/3lojqxxPvq.txt {
|
|
|
+ root /opt/apps/api.d5ct.com;
|
|
|
+ }
|
|
|
+ location / {
|
|
|
+ proxy_next_upstream off;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header Host $host;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Connection "";
|
|
|
+ proxy_pass http://rungobackend;
|
|
|
+ }
|
|
|
+
|
|
|
+ location /ngx {
|
|
|
+ stub_status on;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+# HTTPS server
|
|
|
+server {
|
|
|
+ listen 443 ssl;
|
|
|
+ server_name api.d5c360.com;
|
|
|
+ charset utf-8;
|
|
|
+ #ssl on;
|
|
|
+ ssl_certificate /opt/apps/api.d5ct.com/go/gopath/src/api.com/static/28412282648270.pem;
|
|
|
+ ssl_certificate_key /opt/apps/api.d5ct.com/go/gopath/src/api.com/static/28412282648270.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 / {
|
|
|
+ proxy_next_upstream off;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header Host $host;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Connection "";
|
|
|
+ proxy_pass http://api.d5c360.com;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+# HTTPS server
|
|
|
+server {
|
|
|
+ listen 443 ssl;
|
|
|
+ server_name api.d5ct.com;
|
|
|
+ charset utf-8;
|
|
|
+ #ssl on;
|
|
|
+ ssl_certificate /opt/apps/api.d5ct.com/go/gopath/src/api.com/static/d5ct/4399987_api.d5ct.com.pem;
|
|
|
+ ssl_certificate_key /opt/apps/api.d5ct.com/go/gopath/src/api.com/static/d5ct/4399987_api.d5ct.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 / {
|
|
|
+ #proxy_next_upstream off;
|
|
|
+ #proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ #proxy_set_header Host $host;
|
|
|
+ #proxy_http_version 1.1;
|
|
|
+ #proxy_set_header Connection "";
|
|
|
+ proxy_pass http://api.d5ct.com;
|
|
|
+ }
|
|
|
+}
|