Post

Debian-Installation-Nextcloud-PhpMyAdmin

Debian-Installation-Nextcloud-PhpMyAdmin

Debian-Installation-Nextcloud-PhpMyAdmin

Applications Web

Nextcloud

Cartographie

Le dossier /home/stret/osm est synchronisé via nextcloud Créer un lien
sudo ln -s /home/stret/osm /var/www/osm
Virtualhost map
sudo nano /etc/nginx/conf.d/map.xinyiczen.xyz.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name map.xinyiczen.xyz;
    root /var/www/osm;

    include ssl_params;
    include header_params;
    include dh_param;
    index index.php index.html index.htm;
        location ~ \.php$ {
           fastcgi_split_path_info ^(.+\.php)(/.+)$;
           fastcgi_pass unix:/run/php/php7.0-fpm.sock;    # PHP7.0 
           fastcgi_index index.php;
           include fastcgi_params;
	   fastcgi_param SCRIPT_FILENAME $request_filename;
        }

    access_log /var/log/nginx/map.xinyiczen.xyz-access.log;
    error_log /var/log/nginx/map.xinyiczen.xyz-error.log;
}
1
2
3
4
5
6
server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name nextcloud.xinyiczen.xyz;
    rewrite ^/(.*) https://xinyiczen.xyz/nextcloud/$1 permanent;
}

PhpMyAdmin

Installation

1
2
3
4
5
6
7
8
sudo -s
cd /var/www
wget https://files.phpmyadmin.net/phpMyAdmin/4.7.4/phpMyAdmin-4.7.4-all-languages.tar.gz
tar -zxvf phpMyAdmin*.tar.gz 
rm phpMyAdmin*.tar.gz
mv phpMyAdmin* pma
cd pma
cp config.sample.inc.php config.inc.php

Mettre un “blowfish”
nano config.inc.php

1
2
3
4
5
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie. Needs to be 32 chars long.
 */
$cfg['blowfish_secret'] = 'p6N5mA7jGQ6T4f6YaaL9fv2k9zYQ7y9G'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

Créer base phpmyadmin , tables pma et utilisateur
mysql -uroot -pXXXXXXXX < sql/create_tables.sql
Autorisations accès global
mysql -uroot -pXXXXXXXX -e "GRANT ALL PRIVILEGES ON *.* TO 'pma'@'localhost' IDENTIFIED BY 'xxxxxxx' WITH GRANT OPTION; FLUSH PRIVILEGES;"
Vhost nginx
nano /etc/nginx/conf.d/xinyiczen.xyz.d/pma.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
location /pma {
  alias /var/www/pma ;

    index index.php;
        location ~ \.php$ {
           fastcgi_split_path_info ^(.+\.php)(/.+)$;
           fastcgi_pass unix:/run/php/php7.0-fpm.sock;    # PHP7.0 
           fastcgi_index index.php;
           include fastcgi_params;
	   fastcgi_param SCRIPT_FILENAME $request_filename;
        }

}

Vérification
nginx -t
Relance
systemctl restart nginx

Cet article est sous licence CC BY 4.0 par l'auteur.