Git Product home page Git Product logo

Comments (4)

codekitchen avatar codekitchen commented on July 26, 2024

The proxy won't do anything with HTTPS unless you have certs loaded into the proxy container, did you do that as well? What does your proxy's nginx config look like when the containers are all running? docker exec dinghy_http_proxy cat /etc/nginx/conf.d/default.conf

from dinghy-http-proxy.

yoodame avatar yoodame commented on July 26, 2024

@codekitchen I work with @MrMMorris. Here what the nginx config looks like:

# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
  default $http_x_forwarded_proto;
  ''      $scheme;
}
# If we receive Upgrade, set Connection to "upgrade"; otherwise, delete any
# Connection header that may have been passed to this server
map $http_upgrade $proxy_connection {
  default upgrade;
  '' close;
}
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
                 '"$request" $status $body_bytes_sent '
                 '"$http_referer" "$http_user_agent"';
access_log off;
# HTTP 1.1 support
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
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 $proxy_x_forwarded_proto;
server {
  listen 80 default_server;
  server_name _;
  root /var/www/default/htdocs;
  error_page 404 /index.html;
}
upstream .db.graphite.docker {
	server 172.17.0.3:3306;
}
server {
	server_name .db.graphite.docker;
	listen 80;
	access_log /var/log/nginx/access.log vhost;
	location / {
		proxy_pass http://.db.graphite.docker;
	}
}
upstream .memcached.graphite.docker {
	server 172.17.0.4:11211;
}
server {
	server_name .memcached.graphite.docker;
	listen 80;
	access_log /var/log/nginx/access.log vhost;
	location / {
		proxy_pass http://.memcached.graphite.docker;
	}
}
upstream .nginx.graphite.docker {
	server 172.17.0.7:443;
}
server {
	server_name .nginx.graphite.docker;
	listen 80;
	access_log /var/log/nginx/access.log vhost;
	location / {
		proxy_pass http://.nginx.graphite.docker;
	}
}
upstream .web.graphite.docker {
	server 172.17.0.5:80;
}
server {
	server_name .web.graphite.docker;
	listen 80;
	access_log /var/log/nginx/access.log vhost;
	location / {
		proxy_pass http://.web.graphite.docker;
	}
}

from dinghy-http-proxy.

codekitchen avatar codekitchen commented on July 26, 2024

Hm yeah, since you haven't added SSL certs to the proxy it's not even listening on port 443.

Oh and actually I missed before that you're hitting port 8080 with http://apache.blah.docker:8080. That is bypassing the proxy completely, the proxy only listens on port 80 (and 443 if you configure SSL). So what you're seeing doesn't have anything to do with the proxy at all, it must be something in your own application that's doing the redirect? Use docker ps to check which container is exposing port 8080 on the host, that'll tell you which container is doing this.

from dinghy-http-proxy.

MrMMorris avatar MrMMorris commented on July 26, 2024

from dinghy-http-proxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.