php - Basic reverse-proxy in Docker: Forbidden (no permission) -
i start jwilder nginx proxy on 8080
docker run -d -p 8080:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
i'm running standard php:apache
container without mapping port (so 80 exposed on container network). use env var connect proxy:
docker run -d -e virtual_host=test.example.com php:apache
on localhost i've added in /etc/hosts:
ip test.example.com
now visit text.example.com:8080
on computer try connect reverse proxy (8080) route me php-apache on container port 80.
but error:
error:
forbidden don't have permission access / on server. apache/2.4.10 (debian) server @ test.example.com port 8080
what missing? have change apache configuration somewhere? (it's default). seems go throught nginx because i'm seeing apache error think need tell apache inside (php apache): allow 'route')?
your title appears misleading. description, you've setup functioning reverse proxy , target connecting reverse proxy broken. if review docker hub page on php:apache image you'll find multiple examples how load php code image , working. e.g.:
$ docker run -d -e virtual_host=test.example.com \ -v "$pwd/your/php/code/dir":/var/www/html php:7.0-apache
wiki
Comments
Post a Comment