Nginx e configuração do Seafile

2

Eu tenho o Seafile com o Nginx sendo executado em um Raspberry Pi.

Agora quero saber como implementar a seguinte estrutura de URL (tudo em HTTPS, porta 443):

https://example.com/seafile           Seafile Webinterface
https://example.com/raspcontrol       Raspcontrol Webinterface

Na pasta raiz, deve haver um arquivo HTML simples com as URLs do Seafile e do Raspcontrol.

Aqui está o meu default -configuration em /etc/nginx/sites-available/ :

server {
    root /usr/share/nginx/www;

    index index.php index.html;
    server_name localhost;

    location / {
    }

    location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
    }

    location ~ /\.ht {
            deny all;
    }
}

E aqui está o meu seahub -configuration em /etc/nginx/sites-available/ :

server {
listen 443;

ssl on;
ssl_certificate /etc/nginx/ssl/seahub.crt;
ssl_certificate_key /etc/nginx/ssl/seahub.key;
server_name example.com;
error_page 497  https://$host:$server_port$request_uri;

client_max_body_size 10G;

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 0;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
}

location /media {
   root /home/seafile/seafile-server-latest/seahub;
}
}
    
por PatrickMA 23.07.2015 / 19:06

0 respostas

Tags