Nginx - "Error while trying to connect"




I just installed Pydio on my VPS. The installation went fine, I can access the web interface, and the android app works. However, when I tried to get the desktop app to work, I get the following error:

Error while trying to connect to (my domain) : server not found (404), is it up and has it Pydio installed ?

I looked around the forum and found this thread, which seems to imply it’s an issue with htaccess. However, I’m using nginx, not Apache, so that’s not very helpful.

For nginx, I used the following configuration included in this guide:

server {
listen 80;
### Change the following line to match your website name
server_name YOUR_SERVER_NAME;
rewrite ^ https://$server_name$request_uri? permanent;
server {
listen 443 ssl;
### Change the following line to match your website name
server_name YOUR_SERVER_NAME;
root /var/www/pydio;
index index.php;
### If you changed the maximum upload size in PHP.ini, also change it below
client_max_body_size 20G;
# Prevent Clickjacking
add_header X-Frame-Options "SAMEORIGIN";

# SSL Settings
### If you are using different names for your SSL certificate and key, change them below:
ssl on;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;

# This settings are destined to limit the supported crypto suites, this is optional and may restrict the availability of your website.
#ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";

keepalive_requests    10;
keepalive_timeout     60 60;
access_log /var/log/nginx/access_pydio7.log;
error_log /var/log/nginx/error_pydio7.log;

client_body_buffer_size 128k;
# All non existing files are redirected to index.php
if (!-e $request_filename){
    # For old links generated from Pydio 6
    rewrite ^/data/public/([a-zA-Z0-9_-]+)$ /public/$1? permanent;
    rewrite ^(.*)$ /index.php last;

# Manually deny some paths to ensure Pydio security
location ~* ^/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) {
        deny all;

# Forward PHP so that it can be executed
location ~ \.php$ {

        fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
        fastcgi_param  SERVER_SOFTWARE    nginx;
        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  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
        fastcgi_param  REQUEST_URI        $request_uri;
        fastcgi_param  DOCUMENT_URI       $document_uri;
        fastcgi_param  DOCUMENT_ROOT      $document_root;
        fastcgi_param  SERVER_PROTOCOL    $server_protocol;
        fastcgi_param  REMOTE_ADDR        $remote_addr;
        fastcgi_param  REMOTE_PORT        $remote_port;
        fastcgi_param  SERVER_ADDR        $server_addr;
        fastcgi_param  SERVER_PORT        $server_port;
        fastcgi_param  SERVER_NAME        $server_name;

        try_files $uri =404;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock ;

# Enables Caching
location ~* \.(ico|css|js)$ {
    expires 7d;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";

I did of course modify the server name, root, and certificate values, but nothing else.


you could take a look at your knowledge base guide, it’s a simple pydio install with nginx.