Want more timely Centmin Mod News Updates?
Become a Member

Nginx Nginx failing with xenforo rewrites

Discussion in 'Install & Upgrades or Pre-Install Questions' started by mikey, Sep 13, 2023.

  1. mikey

    mikey New Member

    2
    1
    3
    Sep 13, 2023
    Ratings:
    +1
    Local Time:
    11:06 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 124.00 stable
    • Nginx Version Installed: 1.24.0
    • PHP Version Installed: 8.1.23
    • MariaDB MySQL Version Installed: 10.3.39
    • When was last time updated Centmin Mod code base ? : today
    • Persistent Config: LETSENCRYPT_DETECT='y'
    Code:
    location / {
    
      index index.php index.html index.htm;
    
      try_files $uri $uri/ /index.php?$uri&$args;
    
    
    
      # block common exploits, sql injections etc
    
      include /usr/local/nginx/conf/block.conf;
    
    
    
      # Enables directory listings when index file not found
    
      autoindex  off;
    
          
    
      }
    
    
    restarting Nginx fails with this error.  I removed all the xenforo location things and nginx restarted again.  adding just the first location / {  caused it to error again.
    
    [code]
    
    [root@igor conf.d]# systemctl status nginx.service
    
    ● nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
    
       Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled)
    
       Active: failed (Result: exit-code) since Tue 2023-09-12 23:39:29 UTC; 23s ago
    
        Docs: man:systemd-sysv-generator(8)
    
      Process: 3436 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)
    
     Main PID: 726 (code=exited, status=0/SUCCESS)
    
    
    Sep 12 23:39:29 igor.xxxxx systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    
    Sep 12 23:39:29 igor.xxxxx nginx[3436]: Starting nginx: nginx: [emerg] unknown directive " " in /usr/local/nginx/conf/conf.d/xxxxx.com.ssl.conf:68
    
    Sep 12 23:39:29 igor.xxxxx nginx[3436]: [FAILED]
    
    Sep 12 23:39:29 igor.xxxxx systemd[1]: nginx.service: control process exited, code=exited status=1
    
    Sep 12 23:39:29 igor.xxxxx systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    
    Sep 12 23:39:29 igor.xxxxx systemd[1]: Unit nginx.service entered failed state.
    
    Sep 12 23:39:29 igor.xxxxx systemd[1]: nginx.service failed.
    
    
    Sep 12 23:39:29 igor.xxxx systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    
    Sep 12 23:39:29 igor.xxxx nginx[3436]: Starting nginx: nginx: [emerg] unknown directive " " in /usr/local/nginx/conf/conf.d/xxxxxx.ssl.conf:68
    
    Sep 12 23:39:29 igor.xxxx nginx[3436]: [FAILED]
    
    Sep 12 23:39:29 igor.xxxx systemd[1]: nginx.service: control process exited, code=exited status=1
    
    Sep 12 23:39:29 igor.xxxxx systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    
    Sep 12 23:39:29 igor.xxxx systemd[1]: Unit nginx.service entered failed state.
    
    Sep 12 23:39:29 igor.xxxx systemd[1]: nginx.service failed.
    
    






     
  2. eva2000

    eva2000 Administrator Staff Member

    53,211
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,650
    Local Time:
    2:06 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    When it fails to restart what does nginx config test command show when you type

    Code (Text):
    nginx -t