debloper / xplex

The renaissance will be streamed LIVE!
http://xplex.me
Mozilla Public License 2.0
6 stars 0 forks source link

Instantiate a VPS to serve homepage and blog #1

Closed debloper closed 6 years ago

debloper commented 6 years ago
debloper commented 6 years ago

Created server 128.199.59.78 $10 DO Ghost Ubuntu 16.04 droplet

debloper commented 6 years ago

nginx configured to serve web and blog

web serves static assets from /var/www/html with config:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    server_name xplex.me;

    root /var/www/html;
    index index.html index.htm;

    client_max_body_size 10M;

    location / {
        try_files $uri $uri/ =404;
    } 
}

blog serves reverse-proxied ghost contents from /var/www/ghost with config:

server {
    listen 80;
    listen [::]:80;

    server_name blog.xplex.me;
    root /var/www/ghost/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:2368;

    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}
debloper commented 6 years ago

DNS updated. Both xplex.me and blog.xplex.me are available and serving intended contents.

debloper commented 6 years ago

Using AMS3 as host zone. Should be a decently central server for global access ping/latency.