Join the community today
Become a Member

[Solved] Nginx Wordpress Unable to add or remove domain. Nginx won't start

Discussion in 'Bug Reports' started by EckyBrazzz, Aug 20, 2019.

  1. EckyBrazzz

    EckyBrazzz Active Member

    587
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    3:48 AM
    1.17.x
    10.3.x
    Hi there,

    I wanted to add a domain, did not work got errors, restored the droplet and tried to remove a domain, an also got errors. Yesterday or the day before I added the last domain. No problems, but now It gives problems. Don't know if there was an update, but below is the result of both issues. PS. The backup is 8 hours old.

    View Paste FU4RN
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    9:48 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    First issue:
    Code:
    Starting nginx: nginx: [emerg] "try_files" directive is duplicate in /usr/local/nginx/conf/conf.d/domain.com.conf:67
    Second one:
    Code:
    Starting nginx: nginx: [emerg] "fastcgi_cache" zone "domaincom" is unknown in /usr/local/nginx/conf/nginx.conf:185
     
    • Informative Informative x 1
  3. EckyBrazzz

    EckyBrazzz Active Member

    587
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    3:48 AM
    1.17.x
    10.3.x
    @pamamolf , what do you want to explain? This issue appears out of the nothing..I did not change anything.

    I can do a nprestart without a problem, only when adding or removing this appears
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    9:48 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I misunderstand then sorry....
     
    • Friendly Friendly x 1
  5. EckyBrazzz

    EckyBrazzz Active Member

    587
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    3:48 AM
    1.17.x
    10.3.x
    Server is only a few day old, so gonna keep what's on it there and create a new one. To bad for the hours spend on the setup. Maybe @eva2000 want's to have a look inside. Add key and gain access.

    That's faster and easier than resolving this issue. --> Waste bin after transfer data
     
  6. eva2000

    eva2000 Administrator Staff Member

    41,350
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    4:48 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    From your log paste link

    What's line 67 of your domain.conf?
    Uninstaller seems like did not remove experimental WordPress php-fpm fastcgi_cache directive
     
  7. EckyBrazzz

    EckyBrazzz Active Member

    587
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    3:48 AM
    1.17.x
    10.3.x
    This is the part. Line #67 is the first one out of #142 lines (guess default)

    Code (Text):
      location / {
      include /usr/local/nginx/conf/503include-only.conf;
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args;
    
      # Wordpress fastcgi_cache
        try_files $uri $uri/ /index.php?$args;
    
      # Wordpress Permalinks
       #try_files $uri $uri/ /index.php?q=$uri&$args;
    
      # Nginx level redis Wordpress
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
      }
    


    Noticed before that the wp_uninstaller forgets to remove several other things. Can't rember it, that was before Everynote, when my memory had severe ┬┤problems' leaking info and so.

    Let me send a copy of a snapshot, so you can try it yourself it's on DigitalOcean, then you can test it, restore it and test it again.
     
    Last edited: Aug 20, 2019
  8. eva2000

    eva2000 Administrator Staff Member

    41,350
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    4:48 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    wouldn't have time to do that unfrotunately

    seems you have an extra try_files line as there is only 1x uncommented out try_files like in wordpress php-fpm fasctcgi experimental centmin.sh menu option 22 submenu 4

    grep filter for try_files on such a vhost reveals only one uncommented try_files line
    Code (Text):
    grep try_files /usr/local/nginx/conf/conf.d/domain.com.ssl.conf
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args;
        try_files $uri $uri/ /index.php?$args;
       #try_files $uri $uri/ /index.php?q=$uri&$args;
      #try_files $uri $uri/ /index.php?$args;
    

    Code (Text):
    grep -C1 try_files /usr/local/nginx/conf/conf.d/domain.com.ssl.conf     
      # for wordpress super cache plugin
      #try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # for wp cache enabler plugin
      #try_files $cache_enabler_uri $uri $uri/ $custom_subdir/index.php?$args; 
    
      # Wordpress fastcgi_cache
        try_files $uri $uri/ /index.php?$args;
    
      # Wordpress Permalinks
       #try_files $uri $uri/ /index.php?q=$uri&$args;
    
    --
      # https://community.centminmod.com/posts/18828/
      #try_files $uri $uri/ /index.php?$args;
    
    

    what's output for
    Code (Text):
    grep -C3 try_files /usr/local/nginx/conf/conf.d/domain.com.conf     
     
  9. eva2000

    eva2000 Administrator Staff Member

    41,350
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    4:48 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    also what's contents of your /root/tools/wp_uninstall_domain.com.sh
     
  10. EckyBrazzz

    EckyBrazzz Active Member

    587
    125
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +231
    Local Time:
    3:48 AM
    1.17.x
    10.3.x
    Issue seem to be resolved. During a cron update all time stamps of the domain.com.ssl.conf changed last night. Now they are dated
    Code (Text):
    -rw-r--r--   1 root root 6.8K Aug 19 01:30 domain.com.ssl.conf

    Server is UTC 0 FYI

    I did a test, removed a domain, nginx restarted normally
    Other test, created a domain, nginx restarted normally

    Placing the snapshot back again, upgrade RAM & CPU again (was planned to not use it anymore, so downgraded to save a little on the bill) and continue to use this one.

    Enjoy your trip!