Posts

Showing posts with the label nginx

nginx : set up http/https conf for your server(Ghost)

Let me use cluster.errong.win as a example. All you need to do is replace the server name and port. All reqest to cluster.errong.win will be proxyed by http://127.0.0.1:6666 http conf server { listen 80; listen [::]:80; server_name cluster.errong.win; root /home/errong_leng/www/cluster/system/nginx-root; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:6666; } location ~ /.well-known { allow all; } client_max_body_size 50m; } enable http server to nginx ln -sf /home/errong_leng/www/cluster/system/files/cluster.errong.win.conf /etc/nginx/sites-available/cluster.errong.win.conf ln -sf /etc/nginx/sites-available/cluster.errong.win.conf /etc/nginx/sites-enabled/cluster.errong.win.conf Use Let's Encrypt Le