ISPConfig : gateway timeout (nextcloud updater)

Discussion in 'General' started by ledufakademy, Sep 22, 2020.

  1. ledufakademy

    ledufakademy Member HowtoForge Supporter

    Hello,

    i can't succed in update our nextcloud instance , always stuck with soime gateway timeout !

    Code:
    Create backup
    Parsing response failed. <html> <head><title>504 Gateway Time-out</title></head> <body bgcolor="white"> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx/1.14.2</center> </body> </html>
    
     
  2. ledufakademy

    ledufakademy Member HowtoForge Supporter

    i try this in "options" tabs ... but always fails with gateway 504 timeout !
    Code:
    fastcgi_read_timeout 3600;
    fastcgi_send_timeout 3600;
    fastcgi_connect_timeout 3600;
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    These options must be in the right locations, which means you have to use the location merge function to merge them into the php handler location. See ISPConfig manual, page 160. or search the forum on how to merge nginx settings into a location.
     
  4. ledufakademy

    ledufakademy Member HowtoForge Supporter

    hello Till,
    page 160 is : 4.6.2.2 Database Users
    :eek:
     
  5. ledufakademy

    ledufakademy Member HowtoForge Supporter

    Page 148 , but this did not answer how to increase nginx (or php or fatscgi or what else) timeout, needed for nextcloud.
    Or perhpas someoine here have a working php.ini and nginx ready setup ...here. ?
     
  6. ledufakademy

    ledufakademy Member HowtoForge Supporter

    i got a lovely : "Step 6 is currently in process. Please reload this page later."
     
  7. ledufakademy

    ledufakademy Member HowtoForge Supporter

    no need to merge because the vhost file seems to be correct ...
    Correct this with ###delete## in block ..

    but always error !

    here is my vhost file ...

    Code:
    server {
            listen *:80;
            listen [::]:80;
            listen *:443 ssl;
            ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
            listen [::]:443 ssl;
            ssl_certificate /var/www/clients/client2/web59/ssl/cloud.domain.com-le.crt;
            ssl_certificate_key /var/www/clients/client2/web59/ssl/cloud.domain.com-le.key;
    
            server_name cloud.domain.com ;
    
            root   /var/www/cloud.domain.com/web/;
    
            if ($scheme != "https") {
                rewrite ^ https://$http_host$request_uri? permanent;
            }
    
    
            index index.html index.htm index.php index.cgi index.pl index.xhtml;
    
    
    
            error_log /var/log/ispconfig/httpd/cloud.domain.com/error.log;
            access_log /var/log/ispconfig/httpd/cloud.domain.com/access.log combined;
    
            location ~ /\. {
                deny all;
            }
    
            location ^~ /.well-known/acme-challenge/ {
                access_log off;
                log_not_found off;
                auth_basic off;
                root /usr/local/ispconfig/interface/acme/;
                autoindex off;
                index index.html;
                try_files $uri $uri/ =404;
            }
    
            location = /favicon.ico {
                log_not_found off;
                access_log off;
                expires max;
                add_header Cache-Control "public, must-revalidate, proxy-revalidate";
            }
    
            location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
            }
    
            location /stats/ {
    
                index index.html index.php;
                auth_basic "Members Only";
                auth_basic_user_file /var/www/clients/client2/web59/web//stats/.htpasswd_stats;
            }
    
            location ^~ /awstats-icon {
                alias /usr/share/awstats/icon;
            }
    
    
            location @php {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass unix:/var/lib/php7.3-fpm/web59.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors on;
            }
    
            location /cgi-bin/ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                root /var/www/clients/client2/web59;
                gzip off;
                fastcgi_pass  unix:/var/run/fcgiwrap.socket;
                fastcgi_index index.cgi;
                fastcgi_param DOCUMENT_ROOT /web;
                fastcgi_param HOME /web;
                fastcgi_param SCRIPT_FILENAME /web$fastcgi_script_name;
                fastcgi_intercept_errors on;
            }
    
    
    
            add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
            add_header Referrer-Policy "no-referrer" always;
            add_header X-Content-Type-Options "nosniff" always;
            add_header X-Download-Options "noopen" always;
            add_header X-Frame-Options "SAMEORIGIN" always;
            add_header X-Permitted-Cross-Domain-Policies "none" always;
            add_header X-Robots-Tag "none" always;
            add_header X-XSS-Protection "1; mode=block" always;
    
            fastcgi_hide_header X-Powered-By;
    
    
    
    
            location = /.well-known/carddav {
                return 301 $scheme://$host:$server_port/remote.php/dav;
            }
            location = /.well-known/caldav {
                return 301 $scheme://$host:$server_port/remote.php/dav;
            }
            location ~ /.well-known/acme-challenge {
                allow all;
            }
    
            client_max_body_size 512M;
            fastcgi_buffers 64 4K;
    
            gzip on;
            gzip_vary on;
            gzip_comp_level 4;
            gzip_min_length 256;
            gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
            gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
    
    
            location / {
                rewrite ^ /index.php;
            }
    
            location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
                deny all;
            }
            location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
                deny all;
            }
    
            location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
                fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
                set $path_info $fastcgi_path_info;
                try_files $fastcgi_script_name =404;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $path_info;
                fastcgi_param HTTPS on;
                fastcgi_param modHeadersAvailable true;
                fastcgi_param front_controller_active true;
            fastcgi_pass unix:/var/lib/php7.3-fpm/web59.sock;
            fastcgi_read_timeout 3600;
            fastcgi_send_timeout 3600;
            fastcgi_connect_timeout 3600;
                fastcgi_intercept_errors on;
                fastcgi_request_buffering off;
            }
    
            location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
                try_files $uri/ =404;
                index index.php;
            }
    
            location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
                try_files $uri /index.php$request_uri;
                add_header Cache-Control "public, max-age=15778463";
                add_header Referrer-Policy "no-referrer" always;
                add_header X-Content-Type-Options "nosniff" always;
                add_header X-Download-Options "noopen" always;
                add_header X-Frame-Options "SAMEORIGIN" always;
                add_header X-Permitted-Cross-Domain-Policies "none" always;
                add_header X-Robots-Tag "none" always;
                add_header X-XSS-Protection "1; mode=block" always;
    
                access_log off;
            }
    
            location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
                try_files $uri /index.php$request_uri;
                access_log off;
            }
    
    
    
    
    }
     
    Last edited: Sep 22, 2020
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    It is page 150 and not 160 indeed, which shows how to merge various fastcgi parameters into the php location. And you posted already which parameters you want to use, so you should know what you posted.

    But you are aware that parameters outside of the correct location get ignored by nginx?
     
  9. ledufakademy

    ledufakademy Member HowtoForge Supporter

    i'm adminsys ... webmastering is very awfull.
    ispconfig overload the level ...
    note : My nextcloud instances are working perfectly with nginx, php-fpm , but here ...
    :(
     
  10. ledufakademy

    ledufakademy Member HowtoForge Supporter

    THE hard way , move IPSCOnfig vhost, put NEtxcloud nginx vhost : but always stuck with

    • Extracting
      Parsing response failed.
    What did ispconfig is doing or not with php ???
     
  11. ledufakademy

    ledufakademy Member HowtoForge Supporter

    thank to proxmox (sysadmin roxx !) , rollback to yesterday VM.
    But ispconfig <-> nextcloud issue not solved ....
    thank you for you help Till

    can someone post his nginx and php conf ?
     
  12. ledufakademy

    ledufakademy Member HowtoForge Supporter

Share This Page