in my ubuntu have 2 docker container, one is nginx, other one is gitea.
I tried set nginx proxy pass to reverse proxies the gitea, but don't know why not working at all.
this is my default.conf
server {
listen 80;
listen [::]:80;
server_name www.mydomain.com mydomain.com;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
this is my git.domain.com.conf
server {
listen 2222;
listen 4000;
listen [::]:2222;
server_name git.domain.com;
location / {
proxy_pass http://xxx.xxx.xxx.xxx:4000;
client_max_body_size 512M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
when I access the website git.domain.com, it just show Welcome to nginx! that page.
Thank you so much for helping.
Trying to reverse proxies the web, but not working.