Afficher/cacher Sommaire
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
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;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name nextcloud.xinyiczen.xyz;
rewrite ^/(.*) https://xinyiczen.xyz/nextcloud/$1 permanent;
}
PhpMyAdmin
Installation
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
/*
* 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
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