Closed kenpachizero closed 1 year ago
Hi Can you post your docker-compose file?
Hi i used portainer to set this up so i dont have a docker compose file but let me know what you are after and i'll post it. Some of the info you are after might be in that link to the docker forums
ok, so i tried to work with wordpress since it goes through fpm as well and i got it to work with this config
server {
listen 83;
server_name _;
root /var/www/wordpress;
index index.php;
access_log /var/log/nginx/access/wordpress.log;
error_log /var/log/nginx/error/wordpress.log debug;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 172.31.255.253:9000;
fastcgi_index index.php;
include /etc/nginx/params/fastcgi.conf;
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
so i tried a similar config
server {
listen 82;
server_name _;
root /var/www/pma;
index index.php;
access_log /var/log/nginx/access/pma.log;
error_log /var/log/nginx/error/pma.log debug;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 172.31.255.228:9000;
fastcgi_index index.php;
include /etc/nginx/params/fastcgi.conf;
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
but get the error: "502 Bad Gateway"
Are the two containers on the same network?
Hi William, Yes they are on the same 172.31.255.* network
Hi William, Yes they are on the same 172.31.255.* network
What does nginx/fpm container logs say? It's strange
2022/12/13 00:27:45 [error] 23#23: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.0.17, server: _, request: "GET / HTTP/1.1", upstream: "http://172.31.255.228:8081/", host: "192.168.0.43:82"
Im not sure where the 8081 is coming from
found the 8081 and removed it its loading to some degree:
Fatal error: Uncaught ErrorException: mysqli::real_connect(): (HY000/2002): No route to host in /var/www/html/libraries/classes/Dbal/DbiMysqli.php:122 Stack trace: #0 [internal function]: PhpMyAdmin\ErrorHandler->handleError(2, 'mysqli::real_co...', '/var/www/html/l...', 122) #1 /var/www/html/libraries/classes/Dbal/DbiMysqli.php(122): mysqli->real_connect('172.31.255.235', 'root', 'xxxx', '', 0, '', 0) #2 /var/www/html/libraries/classes/DatabaseInterface.php(1877): PhpMyAdmin\Dbal\DbiMysqli->connect('root', 'VMfrSo1mzN0LO7M...', Array) #3 /var/www/html/libraries/classes/Common.php(604): PhpMyAdmin\DatabaseInterface->connect(256) #4 /var/www/html/libraries/classes/Common.php(233): PhpMyAdmin\Common::connectToDatabaseServer(Object(PhpMyAdmin\DatabaseInterface), Object(PhpMyAdmin\Plugins\Auth\AuthenticationConfig)) #5 /var/www/html/index.php(40): PhpMyAdmin\Common::run() #6 {main} thrown in /var/www/html/libraries/classes/Dbal/DbiMysqli.php on line 122
fixed that, i have put in the config file 2 maria db servers and they both weren't running, but its loading now,!
Hi All, i have tried to get some help on docker forums but was not able to find a want to get it to work so trying my luck here: nginx-172.31.255.226-81:81-82:82 nginx_etc /etc/nginx nginx_log /var/log/nginx phpma_html /var/www/pma mariadb-172.31.255.229-3306:3306 /var/lib/mysql phpmyadmin-172.31.255.228-9000:9000 phpma_etc | /etc/phpmyadmin phpma_html | /var/www/html
and here is my nginx config file currently
fastcgi.conf
Please let me know if i missed something, thanks in advanced.