Mobile app version of vmapp.org
Login or Join
Vandalay111

: How do I run blog subdomain with ghost blog and linode? I want a prepare a blog using ghost in a subdomain of my website. I made a A/AAAA record in linode settings: A/AAAA Records Hostname

@Vandalay111

Posted in: #Linode #Nginx

I want a prepare a blog using ghost in a subdomain of my website. I made a A/AAAA record in linode settings:

A/AAAA Records
Hostname IP Address TTL Options
139.162.250.252 Default Edit | Remove
blog 139.162.250.252 Default Edit | Remove
mail 139.162.250.252 Default Edit | Remove
www 139.162.250.252 Default Edit | Remove
2a01:7e00::f03c:91ff:fed5:1436 Default Edit | Remove
blog 2a01:7e00::f03c:91ff:fed5:1436 Default Edit | Remove
mail 2a01:7e00::f03c:91ff:fed5:1436 Default Edit | Remove
www 2a01:7e00::f03c:91ff:fed5:1436 Default Edit | Remove
Add a new A/AAAA record


I prepared settings for nginx

server {
listen 80;
server_name blog.datacoding.io;

access_log /var/log/nginx/domain.name.access.log;
error_log /var/log/nginx/domain.name.error.log;

location '/.well-known/acme-challenge' {
root /srv/http/letsencrypt;
default_type "text/plain";
try_files $uri =404;
}

location / {
return 301 $host$request_uri; }
}
server {
listen 443 ssl http2;
server_name blog.datacoding.io;

access_log /var/log/nginx/ghost.domain.name.access.log;
error_log /var/log/nginx/ghost.domain.name.error.log;

#ssl_certificate /etc/letsencrypt/live/domain.name/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/domain.name/privkey.pem;
#ssl_trusted_certificate /etc/letsencrypt/live/domain.name/chain.pem;

ssl_session_timeout 1d;
ssl_session_cache shared:SSL:64m;
ssl_session_tickets off;

ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-$

add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";
ssl_stapling on;
ssl_stapling_verify on;

add_header X-Frame-Options DENY;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy no-referrer-when-downgrade;
add_header Content-Security-Policy "default-src https:";

resolver 8.8.8.8 8.8.4.4;
resolver_timeout 5s;

location '/' {
client_max_body_size 32M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_pass 127.0.0.1:2368; }
}


I installed ghost using ghost-cli

ghost install --no-prompt --no-stack --no-start
--dir /opt/ghost --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd
--db sqlite3 --dbpath /opt/ghost/content/data/ghost.db
--ip 127.0.0.1 --port 2368 --url ghost.domain.name

and my production settings

"url": "https://blog.datacoding.io",
"server": {
"port": 2368,
"host": "127.0.0.1"
},
"database": {
"client": "sqlite3",
"connection": {
"filename": "/opt/ghost/content/data/ghost.db"
}
},
"mail": {
"transport": "SMTP",
"from": "'Datacoding <info@datacoding.io>",
"options": {
"service": "Yandex",
"auth": {
"user": "info@datacoding.io",
"pass": "DATAcoding1807"
}
}
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/opt/ghost/content"
}
}


I cant reach my site, can you help me ?

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme