Hello. A week I can not solve the problem, all the options in my head are already mixed, help) The laptop is Debian 8 + apache2 + nginx (port 80). Installed phpmyadmin, mysql, and more. Created the domain "test" it opens, on it functions php.
Task: "Run phpmyadmin"
I run http: // test / pma / - 403 Forbidden nginx / 1.6.2
in /var/log/nginx/error.log only
Using 32768KiB of shared memory for push module in /etc/nginx/nginx.conf:66 apache2 -t and nginx -t commands do not issue errors
in the test file which is in / etc / nginx / sites-avaible / (and there is a link to it in sites-enabled)
server{ server_name test; access_log /var/log/nginx/test.access.log; error_log /var/log/nginx/test.error.log; root /home/miha/opt/test/www; location ~ \\.php$ { try_files $uri = 404; include fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location / { index index.php index.html index.htm; } location /pma/ { disable_symlinks off; alias /usr/share/phpmyadmin/; location ~ \\.php$ { fastcgi_pass unix:/var/run/php-pool-name.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_ignore_client_abort off; fastcgi_param PHP_ADMIN_VALUE "open_basedir=/usr/share/phpmyadmin:/usr/share/php/php-gettext"; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { access_log off; log_not_found off; expires 1M; } } location /errors { alias /home/www-data/mysite/errors ; } error_page 404 /errors/404.html; } 777 rights to the folder where the site / home / miha / and / usr / share / phpmyadmin
.htaccess files are not observed in these folders and above
in / /etc/apache2/apache2.conf is
include /etc/phpmyadmin/apache.conf I added another pma.test subdomain - now there are 502 Bad Gateway nginx / 1.6.2 BUT there is already a favicon from phpmyadmin
server { server_name pma.test; access_log /var/log/nginx/test.access.log; error_log /var/log/nginx/test.error.log; location / { root /usr/share/phpmyadmin; index index.php; } location ~ \.php$ { include /etc/nginx/fastcgi.conf; fastcgi_pass unix:/tmp/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$fastcgi_script_name; } } The contents of the log /var/log/nginx/test.error.log
2016/07/16 20:57:07 [crit] 2337#0: *1 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: pma.test, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "pma.test" 2016/07/16 20:57:09 [crit] 2337#0: *1 connect() to unix:/tmp/php-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: pma.test, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "pma.test" 2016/07/16 20:57:13 [error] 2337#0: *4 directory index of "/usr/share/phpmyadmin/" is forbidden, client: 127.0.0.1, server: test, request: "GET /pma/ HTTP/1.1", host: "test" 2016/07/16 20:57:14 [error] 2337#0: *4 directory index of "/usr/share/phpmyadmin/" is forbidden, client: 127.0.0.1, server: test, request: "GET /pma/ HTTP/1.1", host: "test"