Welcome to Centmin Mod Community
Become a Member

Domains Changed domain name, can;t restart nginx

Discussion in 'Domains, DNS, Email & SSL Certificates' started by DaB, Jun 24, 2021.

  1. DaB

    DaB Member

    45
    5
    8
    Aug 10, 2016
    Ratings:
    +6
    Local Time:
    6:32 AM
    Current
    Current
    I have followed this guide Nginx - Insight Guide - How to change a site's domain name with HTTPS and Letsencrypt SSL Certificate? to change the domain name however when I try to restart nginx it fails with this error.



    Code:
    Restarting php-fpm (via systemctl) [  OK  ]
    [14:20][root@herald addons]# nprestart
    Restarting nginx (via systemctl):  Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    47,501
    10,779
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,752
    Local Time:
    4:32 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    run nginx check config command below to see what nginx config issue it is tripping up on
    Code (Text):
    nginx -t
     
  3. DaB

    DaB Member

    45
    5
    8
    Aug 10, 2016
    Ratings:
    +6
    Local Time:
    6:32 AM
    Current
    Current
    I get this....

    Code:
    nginx: [emerg] open() "/usr/local/nginx/conf/ssl/newdomain.co.uk/newdomain.co.uk.crt.key.conf" failed (2: No such file or directory) in /usr/local/nginx/conf/conf.d/newdomain.co.uk.                                                 ssl.conf:15
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
    
     
  4. DaB

    DaB Member

    45
    5
    8
    Aug 10, 2016
    Ratings:
    +6
    Local Time:
    6:32 AM
    Current
    Current
    The crt.key.conf is missing for some reason.
     
  5. DaB

    DaB Member

    45
    5
    8
    Aug 10, 2016
    Ratings:
    +6
    Local Time:
    6:32 AM
    Current
    Current
    I have fixed the missing file problem and I can now restart Nginx.

    I am now getting an HTTP 500 error trying to access the new domain.