I
I
Ilyas2014-10-01 12:33:09
Python
Ilyas, 2014-10-01 12:33:09

Why does a FastCGI web application that is proxied with NGINX not display correctly?

Hello!
I want to hang the file server Seafile 3.1.6 64bit , which runs on FastCGI, on HTTPS using NGINX (OS: Ubuntu 14.04 x64).
But for some reason it is displayed incorrectly (http/https - no difference)
Screenshot 50.74 KB Nginx
web server config :

server {
    listen 80;
    server_name seafile.local;
  rewrite ^/(.*) https://$server_name/$1 permanent;
    }
  
    server {
        listen 443;
        ssl on;
        ssl_certificate /home/user/ssl/cert.crt;
        ssl_certificate_key /home/user/ssl/cert.key;
        server_name seafile.local;
        location / {
            fastcgi_pass    127.0.0.1:8000;
            fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
            fastcgi_param   PATH_INFO           $fastcgi_script_name;
            fastcgi_param   SERVER_PROTOCOL    $server_protocol;
            fastcgi_param   QUERY_STRING        $query_string;
            fastcgi_param   REQUEST_METHOD      $request_method;
            fastcgi_param   CONTENT_TYPE        $content_type;
            fastcgi_param   CONTENT_LENGTH      $content_length;
            fastcgi_param   SERVER_ADDR         $server_addr;
            fastcgi_param   SERVER_PORT         $server_port;
            fastcgi_param   SERVER_NAME         $server_name;
            fastcgi_param   HTTPS               on;
            fastcgi_param   HTTP_SCHEME         https;

            access_log      /var/log/nginx/seahub.access.log;
            error_log       /var/log/nginx/seahub.error.log;
        }

        location /seafhttp {
            rewrite ^/seafhttp(.*)$ $1 break;
            proxy_pass http://127.0.0.1:8082;
            client_max_body_size 1024;
        }
        location /media {
        root /var/Seafile/seafile-server-latest/seahub;
        }
    }
}

netstat -tulnp :
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1054/mysqld
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      26341/nginx
tcp        0      0 0.0.0.0:10001           0.0.0.0:*               LISTEN      25975/ccnet-server
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      25978/fileserver
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      619/sshd
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      26341/nginx
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      26026/python2.7
tcp        0      0 0.0.0.0:12001           0.0.0.0:*               LISTEN      25979/seaf-server

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grechushnikov, 2014-10-01
@ilyasus

you better show what the firebug shows. most likely the static is not given by the server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question