7. Web Server (Nginx or Apache) and SSL Configuration Verification
Ghost-CLI automatically generates and applies the configuration file for the chosen web server (Nginx or Apache). It also automatically issues the SSL certificate using Let\'s Encrypt.
7.1. Nginx Configuration Verification
Check the configuration file generated by Ghost-CLI when Nginx was selected.
# Check location of the Nginx configuration file
ls -l /etc/nginx/sites-available/<your-domain.com>.conf
# Check Nginx syntax for errors
sudo nginx -t
# Restart Nginx service
sudo systemctl restart nginx
7.2. Apache Configuration Verification
Check the configuration file generated by Ghost-CLI when Apache was selected. (Note: The path may vary slightly based on the Ghost-CLI configuration.)
# Check location of the Apache configuration file
ls -l /etc/httpd/conf.d/<your-domain.com>-ssl.conf
# Check Apache syntax for errors
sudo httpd -t
# Restart Apache service
sudo systemctl restart httpd
8. Systemd Service Status Check
Ghost-CLI creates a Systemd service file to run the Ghost application in the background and ensure it starts automatically upon server reboot. The service name is typically in the format ghost_<your-domain-name>.
8.1. Checking Service File and Status
# Check Systemd service file location
ls -l /lib/systemd/system/ghost_<your-domain.com>.service
# Check Ghost service status
sudo systemctl status ghost_<your-domain.com>
The status should display as active (running) with no errors in the logs.
8.2. Checking Ghost Execution Port (Optional)
You can verify that Ghost is running correctly on its local port. It defaults to port 2368.
sudo lsof -i :2368
Note: This port (2368) should only be accessible via Nginx/Apache and does not need external direct access.