Bonjour,

Ce soir, je suis dans une impasse :

J'ai un petit vps sous ubuntu 16.04, avec Nginx d'installé et php 7.0.

Des sous domaine pointant sur des répertoires assiciés.

Tout cela fonctionne.

J'ai intallé également phpmyadmin qui se trouve dans le répertoire /etc/phpmyadmin

Je cherche à faire un alias pour l'url mondomaine.com/mariadb/ qui doit pointer aloars sur /etc/phpmyadmin
alors que mondomaine.com pointe normalement sur /var/www/mondomaine

Voici le fichier de configuration :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Virtual Host configuration for mondomaine.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
	listen 80;
	listen [::]:80;

	server_name mondomaine.com;

	root /var/www/html/_develop;
	index index.html index.php;

	location / {
		try_files $uri $uri/ =404;
	}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass 127.0.0.1:9000;
  }
  
 location /mariadb {
    alias /etc/phpmyadmin;
    index index.html index.php;
      location ~ \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass 127.0.0.1:9000;
      }

   
}
Quand je lance url mondomaine.com/mariadb, dans erreur log, ça pointe sur /etc/phpmyadmin/mariadb

J'ai dans les log cette erreur :

2016/06/05 23:07:42 [error] 4863#4863: *69 FastCGI sent in stderr: "Unable to open primary script: /etc/phpmyadmin/mariadb/index.php (No such file or directory)" while reading response header from upstream, client: monIP, server: mondomaine.com, request: "GET /mariadb/index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mondomaine.com"
Si vous avez des pistes, je suis preneur

Merci

Guiliguili

PS : j'ai rechercher tous les tuto sur l'aliasing et nginx, mais je n'ai pas eu de bon résultat (toujours le même en fait)