Skip to content

Instantly share code, notes, and snippets.

@FOCI-DEV
Last active June 29, 2018 20:28
Show Gist options
  • Save FOCI-DEV/058c6a56a1d8c81728df1ec8f955cd7f to your computer and use it in GitHub Desktop.
Save FOCI-DEV/058c6a56a1d8c81728df1ec8f955cd7f to your computer and use it in GitHub Desktop.
Logs

Nginx config

Domain

types.wiki

Server config

conf.d/types.wiki.conf

Site files:

sites-available/types.wiki

Wiki.js config

Site:

https://types.wiki

Port:

3000


LOGS BELOW
502 Bad Gateway
nginx/1.14.0
title: Types
host: 'https://types.wiki'
port: 3000
paths:
repo: ./repo
data: ./data
uploads:
maxImageFileSize: 3
maxOtherFileSize: 100
lang: en
langRtl: false
public: true
auth:
defaultReadAccess: true
local:
enabled: true
[...]
2018-06-29T18:55:08.522+0000 I STORAGE [conn18] Finishing collection drop for wiki.test (df8938e6-5edd-4d3d-b6e1-213e2706b7a2).
2018-06-29T18:55:08.539+0000 I NETWORK [conn18] end connection 127.0.0.1:51190 (0 connections now open)
2018-06-29T18:55:34.494+0000 I NETWORK [listener] connection accepted from 127.0.0.1:51192 #19 (1 connection now open)
2018-06-29T18:55:34.497+0000 I NETWORK [conn19] received client metadata from 127.0.0.1:51192 conn19: { driver: { name: "nodejs", version: "2.2.31" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.4.38-std-1" }, platform: "Node.js v10.5.0, LE, mongodb-core: 2.1.15" }
2018-06-29T18:55:34.768+0000 I NETWORK [conn19] end connection 127.0.0.1:51192 (0 connections now open)
2018/06/29 19:25:28 [error] 7169#7169: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 207.244.71.100, server: types.wiki, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3001/", host: "types.wiki"
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name types.wiki;
root /etc/nginx/sites-enabled/;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS";
ssl_prefer_server_ciphers on;
ssl_certificate /etc/nginx/certs/types.wiki/domain.cert.pem;
ssl_certificate_key /etc/nginx/certs/types.wiki/private.key.pem;
ssl_trusted_certificate /etc/nginx/certs/types.wiki/intermediate.cert.pem;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_next_upstream error timeout http_502 http_503 http_504;
}
}
@FOCI-DEV
Copy link
Author

winscp_2018-06-29_16-13-05

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment