在 NGINX 服务器上安装了 GHOST,我破坏了它的 ssl 配置文件,现在 NGINX 不会重启

Installed GHOST on NGINX server and I broke it's ssl config file now NGINX won't restart

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name creationist.codes;
    root /var/www/creationist/system/nginx-root; # Used for acme.sh SSL verification (https://acme.sh)

    ssl_certificate /etc/letsencrypt/creationist.codes/fullchain.cer;
    ssl_certificate_key /etc/letsencrypt/creationist.codes/creationist.codes.key;
    include /etc/nginx/snippets/ssl-params.conf;

    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:2369;
        
    }

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

    client_max_body_size 50m;
}

 proxy_pass http://websocket;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header HOST $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass_request_headers on;

NGINX 状态 ->

root@creationistcodes:~# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-08-29 01:03:10 +07; 10s ago
     Docs: man:nginx(8)
  Process: 13970 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 956 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 15308 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
 Main PID: 962 (code=exited, status=0/SUCCESS)
Aug 29 01:03:10 creationistcodes systemd[1]: Starting A high performance web server and a reverse proxy server...
Aug 29 01:03:10 creationistcodes nginx[15308]: nginx: [emerg] "proxy_pass" directive is not allowed here in /etc/nginx/sites-enabled/creationist.codes-ssl.conf:28
Aug 29 01:03:10 creationistcodes nginx[15308]: nginx: configuration file /etc/nginx/nginx.conf test failed
Aug 29 01:03:10 creationistcodes systemd[1]: nginx.service: Control process exited, code=exited status=1
Aug 29 01:03:10 creationistcodes systemd[1]: nginx.service: Failed with result 'exit-code'.
Aug 29 01:03:10 creationistcodes systemd[1]: Failed to start A high performance web server and a reverse proxy server.

我不确定这是怎么发生的,我只是在尝试配置另一个服务器块并且错误地将服务器块下面的这个添加到我的 SSL 块并重新启动了服务器。由于抛出了错误,我按原样重新编辑了它,现在我不确定该怎么做!请帮忙!!

## For something.creationist.codes domain
server {
        listen 80;
        listen [::]:80;
        root /var/www/something.creationist.codes;
        index index.html;
        server_name something.creationist.codes;
}

错误消息显示 "proxy_pass" directive is not allowed here ...:28。如果您检查 :28 行,您会发现有一些语句以 proxy_pass http://websocket; ... 开头并且超出了 server {...} 范围。

proxy pass 指令必须在 location 的范围内使用。所以我会删除 server {...} 之外的所有内容。还要确保第 17 行 (proxy_pass http://127.0.0.1:2369;) 定义的服务已启动并且 运行.