Learn about Centmin Mod LEMP Stack today
Become a Member

503 ERROR Service Temporarily Unavailable

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Afterward, Sep 17, 2014.

  1. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:06 PM
    1.7.5
    5.5
    Hello everybody so i switched to centmind mod because of all the awesomness but i kinda have an issue that when i access my website i get that error, how can i know whats causing it?
    Also i can access the admincp just fine but no the forum index.
    Edit: i tried to disable friendly url in acp then worked, i enabled friendly url again and everything seemed ok ut when i logged out of the forum i got 503 error again and now i can only access acp again :/

     
    Last edited: Sep 17, 2014
  2. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    1:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
     
    Last edited: Sep 18, 2014
  3. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:06 PM
    1.7.5
    5.5
    I'm using xenforo and here is the configuration file
    Code:
    server {
      server_name domain.com www.domain.com;
      return 301 https://domain.com$request_uri;
    
    }
    
    # https SSL SPDY vhost
    server {
            listen 443 ssl spdy;
                server_name domain.com;
    
            ssl_certificate      /usr/local/nginx/conf/ssl/domaincom/domain.com-unified.crt;
            ssl_certificate_key  /usr/local/nginx/conf/ssl/domaincom/ssl.key;
            ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
            ssl_session_cache      shared:SSL:10m;
            ssl_session_timeout  10m;
            ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!kEDH:!EDH:!CAMELLIA;
            ssl_prefer_server_ciphers   on;
            add_header Alternate-Protocol  443:npn-spdy/3;
            add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
            #add_header  X-Content-Type-Options "nosniff";
            #add_header X-Frame-Options DENY;
            # nginx 1.5.9+ or higher
            # http://nginx.org/en/docs/http/ngx_http_spdy_module.html#spdy_headers_comp
            # http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_buffer_size
            # spdy_headers_comp 0;
            # ssl_buffer_size 4k;
    
            # enable ocsp stapling
            resolver 8.8.8.8;
            ssl_stapling on;
            ssl_stapling_verify on;
            ssl_trusted_certificate /usr/local/nginx/conf/ssl/domaincom/domain.com-trusted.crt;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/domain.com/log/access.log combined buffer=32k;
      error_log /home/nginx/domains/domain.com/log/error.log;
    
      root /home/nginx/domains/domain.com/public;
    
    # ngx_pagespeed & ngx_pagespeed handler
    include /usr/local/nginx/conf/pagespeed.conf;
    include /usr/local/nginx/conf/pagespeedhandler.conf;
    include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      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  on;
    
      }
    
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/php.conf;
      include /usr/local/nginx/conf/drop.conf;
      include /usr/local/nginx/conf/errorpage.conf;
    }
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    1:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    forums located in sub directory or main root of domain ? if off of sub directory i.e. /forums, need to change location specified to /forums. Other than that I can not see anything in your config that would cause 503 errors

    you are using SPDY SSL right with valid SSL certificate ?

    Code:
      location /forums {
                index index.php index.html index.htm;
                try_files $uri $uri/ /forums/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  on;
    
      }
     
    Last edited: Sep 18, 2014
  5. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:06 PM
    1.7.5
    5.5
    Forum is located in root and yes its valid ssl certificate that without your guidance i would have never been able to set it up.
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    1:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    if you disable pagespeed does it work ? comment out the pagespeed include lines like this

    Code:
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    and restart nginx server

    and as per How to troubleshoot Centmin Mod initial install issues | Centmin Mod Community check your nginx and php-fpm error logs
     
  7. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:06 PM
    1.7.5
    5.5
    Em i found an index.html in my root folder so i removed it and everything works fine now.
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    1:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah ha :) (y)
     
  9. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:06 PM
    1.7.5
    5.5
    Doh i think i spoke too soon, error is back again when i removed the 503.html file and maintenance.html from the root now i got 404 not found whenever i access my forum, i'm so lost.
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,558
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    1:06 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  11. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    4:06 PM
    1.7.5
    5.5
    Nop i didint removed any xenforo file and i checked the error log and i only see hotlinking of some of my forum images but nothing really related to the error and i see the 404 error when i get logged out automatically, even if i tick to stay logged in i get logged out and i see that 404 error page :s
     
    Last edited: Sep 18, 2014