I’m new Ghost user. Pleased meet you guys.
I trying start Ghost. Seems I sucessed installed Ghost at my vps server but when I open mywebsite.com/g2 which I installed it. 403 Forbidden error show up.
What’s your URL? This is the easiest way for others to debug your issue
mywebsite.com/g2
What version of Ghost are you using?
Ghost-CLI version: 1.16.3
Ghost version: 4.3.3
What configuration?
OS - Centos 7.9
RAM - 2 GB
Nginx 1.19.10
What browser?
Firefox and WaterFox
What errors or information do you see in the console?
ghost doctor shows no error
What steps could someone else take to reproduce the issue you’re having?
I installed Ghost in /var/www/mywebsite.com/html/g2
I installed cerbot SSL. and I can display index.html file at https://mywebsite.com/
Here is my /var/www/html/g2/config.development
Could you teach me what is wrong please?
{
“url”: “h t t p s : / / m y w e b i s i t e .com/g2”,
“server”: {
“port”: 443,
},
“database”: {
“client”: “sqlite3”,
“connection”: {
“filename”: “/var/www/html/g2/content/data/ghost-local.db”
}
},
“mail”: {
“transport”: “Direct”
},
“logging”: {
“transports”: [
“file”,
“stdout”
]
},
“process”: “local”,
“paths”: {
“contentPath”: “/var/www/html/g2/content”
}
}
And Here is /etc/nginx/nginx.conf
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;
server_name m y w e b i s i t e . com;
charset UTF-8;
ssl_certificate /etc/letsencrypt/live/mywebisite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mywebisite.com/privkey.pem;
root /var/www/html;
location / {
index index.php index.html index.htm;
}
location ^~ /blog {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:2368;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}