nginx - The page you are looking for is temporarily unavailable

14,120

Wrong fastcgi_pass :) I just had to change it to 127.0.0.1:9000

Share:
14,120
Delirium
Author by

Delirium

Updated on June 04, 2022

Comments

  • Delirium
    Delirium almost 2 years

    my site is responding me The page you are looking for is temporarily unavailable. Please try again later.

    Any ideas what I did wrong? Thank you.

    This config is working on another site, but not this one. I don't know why.

        server {
                    listen   80; ## listen for ipv4; this line is default and implied
    
                    root /var/www/vhosts/site.com;
                    index index.php index.html index.htm;
    
                    # Make site accessible from http://localhost/
                    server_name server.com;
    
                    error_log /var/log/nginx/err.com.error.log;
    
                    ## Compression
                    gzip              on;
                    gzip_buffers      16 8k;
                    gzip_comp_level   4;
                    gzip_http_version 1.0;
                    gzip_min_length   1280;
                    gzip_types        text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript im$
                    gzip_vary         on;
    
                    add_header Access-Control-Allow-Origin *;
    
                    location / {
                            # if you're just using wordpress and don't want extra rewrites
                            # then replace the word @rewrites with /index.php
                            # try_files $uri $uri/ @rewrites;
                            try_files $uri $uri/ /index.php?$args;
                    }
    
                    # Allow access to root index.php
    #        location ~ ^/index\.php {
            location ~ \.php {
                    include     fastcgi_params;
    #                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass    127.0.0.1:9000;
                    fastcgi_index   index.php;
    #                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
            }
    
            location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|pdf|xlsx|xls|docx|doc|zip|rar)$ {
                     access_log off;
                     expires max;
            }
    
            #
            # 404 error page
            #
            error_page 404 /404.html;
    
            #
            # redirect server error pages to the static page /50x.html
            #
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                   root /usr/share/nginx/www;
            }
    
            location ~ /\.ht {
                    deny all;
            }
    }