phpmyadmin missing css with apache + nginx with a custom domain (port :2222 removed)

Dravenix

New member
Joined
Sep 2, 2021
Messages
2
Hi,

I'm running Nginx + apache with a proxy pass in the nginx config to allow access to directadmin without the port using this guide: https://docs.directadmin.com/direct...#running-da-service-through-apache-on-port-80

However, when attempting to use the one-click sign in for phpmyadmin, or even without the one-click sign in - the phpmyadmin has missing resources (css, js, img). Something is not correct with the proxy pass I believe and not forwarding the requests to the original domain with the 2222 port.

mycontrolpanel.domain.com/phpMyAdmin - phpmyadmin loads, but without css, js etc (nginx proxy pass domain)
da.domain.com/phpMyAdmin - phpmyadmin works here normally (the hostname of the server)

The missing css is "404 not found" on mycontrolpanel.domain.com/phpMyAdmin but works on da.domain.com/phpMyAdmin

EeltT1E.png


Any help will be appreciated.
 
I solved it:
Bash:
sed -i -e '/proxy_pass/ s/$my_server_addr/127.0.0.1/' /etc/nginx/*.conf
service nginx reload
Basically the problem is generated by using private IP and a public one. I think it might be a firewall problem but my resolution is quick and simple because I don't use a muti-server environment.
 
Back
Top