---
title: 'How to install FileGator on Centos Nginx-PHP-FPM | Zomro'
description: 'Filegator is a powerful tool that provides convenient and flexible management of files and folders directly from a web browser. If you already have'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/01_boOr7AV.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * How to install FileGator on Centos Nginx-PHP-FPM 



# How to install FileGator on Centos Nginx-PHP-FPM

31-08-2023

Filegator is a powerful tool that provides convenient and flexible file and folder management directly from a web browser. If you already have Nginx and PHP-FPM installed on your CentOS 7 server, this detailed guide will be an indispensable aid in the Filegator installation process.

**System Upgrade** :

Before starting any work procedure, it is advisable to make sure that system components and packages are updated to the latest versions.
    
    
     sudo yum update -y

**Step 1: Downloading and unzipping Filegator**

First, we will need to download the current version of Filegator. We recommend downloading the program directly from the official GitHub repository.
    
    
     wget https://github.com/filegator/static/raw/master/builds/filegator_latest.zip -P /usr/share/

![How to install FileGator on Centos Nginx-PHP-FPM - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/01_boOr7AV.png)

After downloading, unzip:
    
    
     unzip -o /usr/share/filegator_latest.zip -d /usr/share/ >/dev/null 

![How to install FileGator on Centos Nginx-PHP-FPM - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/02_q6InAXN.png)

**Step 2: Set permissions**

Security — first and foremost. Let's make sure the directory with Filegator has the correct owner and permissions.
    
    
    
    ![How to install FileGator on Centos Nginx-PHP-FPM - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/03_JIHcGkf.png)  
    
    
     usermod -a -G admin apache && chmod +rx /home/backup && chmod -R 775 /home/admin/web && chown -R apache:apache /usr/share/filegator/private/logs && chown -R apache:apache /usr/share/filegator/repository

![How to install FileGator on Centos Nginx-PHP-FPM - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/04_anQCaok.png)

To provide access to backups created using the VestaCP dashboard:
    
    
     chmod +rx /home/backup

![How to install FileGator on Centos Nginx-PHP-FPM - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/05_NOsyhMq.png)

**Step 3: Configure Nginx and PHP-FPM**

The important part of the installation is to configure Nginx to handle requests to Filegator. Depending on your configuration, create or modify the Nginx configuration file to properly handle requests to Filegator by passing them to PHP-FPM for processing.

In this case, you will need to create or modify the Nginx configuration file to properly handle requests to Filegator by passing them to PHP-FPM for processing.

In our case, if the VestaCP panel is installed, we also have phpMyadmin and RoundCube installed, so the configuration of this file will take them into account as well.

Create the filegator-phpmyadmin-roundcube.conf file:
    
    
    vim /etc/nginx/conf.d/filegator-phpmyadmin-roundcube.conf

And add this code to it:
    
    
     server {
        listen $ip_server:80;
        server_name _;
    
        root /usr/share/filegator;
        index index.php;
    
        location / {
            try_files \$uri \$uri/ /index.php?\$args;
        }
    
        location /filegator {
            alias /usr/share/filegator;
    
            location ~ \.php\$ {
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME \$request_filename;
                fastcgi_pass 127.0.0.1:9000;
            }
        }
    
        location /phpmyadmin {
            alias /usr/share/phpMyAdmin;
    
            location ~ \.php\$ {
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME \$request_filename;
                fastcgi_pass 127.0.0.1:9000;
            }
        }
    
        location /phpMyAdmin {
            alias /usr/share/phpMyAdmin;
    
            location ~ \.php\$ {
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME \$request_filename;
                fastcgi_pass 127.0.0.1:9000;
            }
        }
    
        location /roundcubemail {
           index index.php;
           alias /usr/share/roundcubemail;
    
             location ~ \.php\$ {
             include fastcgi_params;
             fastcgi_param SCRIPT_FILENAME \$request_filename;
             fastcgi_pass 127.0.0.1:9000;
        }
    }
        location /webmail {
             index index.php;
             alias /usr/share/roundcubemail;
    
                location ~ \.php\$ {
                    include fastcgi_params;
                    fastcgi_param SCRIPT_FILENAME \$request_filename;
                    fastcgi_pass 127.0.0.1:9000;
        }
    }
    
        include /etc/nginx/conf.d/filegator.inc*;
    }
    

![How to install FileGator on Centos Nginx-PHP-FPM - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/003_5Z0gUDe.png)

**Step 4: Modify the Filegator configuration**

By default, Filegator uses specific paths to store files. If necessary, you can change this path:
    
    
     sed -i "s#__DIR__\.'/repository'#'/home'#g" /usr/share/

![How to install FileGator on Centos Nginx-PHP-FPM - 7](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/08/31/07_MFJyt08.png)

**Шаг 5: Применение изменений**

Завершающим этапом является перезапуск Nginx и PHP-FPM для того, чтобы все изменения вступили в силу:
    
    
    systemctl restart nginx 
    systemctl restart php-fpm

**Завершение** :

Поздравляем! Теперь у вас есть работающий Filegator на сервере CentOS 7 с Nginx и PHP-FPM. Откройте ваш браузер и перейдите по адресу **`http://your_domain_or_ip/filegator`** , чтобы начать работу с вашим новым файловым менеджером.

![How to install FileGator on Centos Nginx-PHP-FPM - 8](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/a48%40server-panel.net/2023/09/07/08_usFqcgl.png)

Similar articles:

[How to enable two-factor authentication in your personal account](https://zomro.com/blog/faq/321-how-to-enable-two-factor-authentication-in-your-personal-account) [How to copy data from a host to Docker and from Docker to a host](https://zomro.com/blog/faq/284-kak-skopirovat-dannye-s-hosta-v-docker-i-iz-docker-na-host) [Cloud VPS: how to create, restore, and migrate a server](https://zomro.com/blog/articles/645-cloud-vps-snapshots-how-to-create-restore-and-migrate-a-server) [How to view Centos 7 server logs](https://zomro.com/blog/faq/350-how-to-view-centos-7-server-logs) [Midnight Commander file manager](https://zomro.com/blog/faq/207-fajlovyj-menedzher-midnight-commander)

[ GPU server from €174.80/mon ](/dedicated-servers/type=gpu)
