Learn about Centmin Mod LEMP Stack today
Register Now

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:
    5:22 PM
    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

    55,425
    12,257
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,839
    Local Time:
    2:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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:
    5:22 PM
    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:
    5:22 PM
    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:
    5:22 PM
    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.