Score:0

How to reverse proxy to a container then through domain name to access the site

ma flag

I set up a WordPress site with docker composer via Portainer. The site can access by the IP address. How can I set reverses proxy and access the site by domain? I tried to put the proxy block in the host server, and the WordPress container( it comes with Apache) both did not work, the error log did not show any useful information.

server {
    listen 80;
    server_name test.bcsystems.nz;

    location / {
        proxy_pass http://192.168.188.80:49157;
    }
}

in flag
Actual error messages would be helpful. But if it is reachable by IP address it should suffice to point the DNS entry to the IP address.
Kevin wang avatar
ma flag
Thank your answer, Gerald, but I don't know how to find the error log, nothing in /var/logs/Nginx or Apache. I put the public IP address on Cloudflare already, if you point to https://test.bcsystems.nz/ there is a 520 error.
in flag
5xx errors are internal server errors. You need to read the server log to solve them.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.