Answer the question
In order to leave comments, you need to log in
PhpMyAdmin behind Nginx+Apache2?
On the server, a bunch of Nginx + Apache2. I can use it only if the external IP is specified in the default config.
Neither localhost nor 127.0.0.1 nor even changing the location to something other than /phpmyadmin/ work.
I figured out the location, it is necessary to make an identical one in the Apache2 config. But this is not the main thing, IP matters. Without this, I can’t figure out how to make a config template.
This is fine?
Working config
location /phpmyadmin/ {
proxy_pass http://85.xxx.xxx.10:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
}
Answer the question
In order to leave comments, you need to log in
location ~ ^/phpmyadmin/* {
proxy_pass http://127.0.0.1:8080;
server_name_in_redirect off;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 60;
proxy_send_timeout 60;
proxy_read_timeout 60;
}
<VirtualHost 127.0.0.1:8080>
ServerAdmin [email protected]
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question