Closed liuqu11 closed 4 years ago
ERR_SSL_PROTOCOL_ERROR
: you're accessing the service via HTTPS while the container does not has SSL enabled - you'll need to use a proxy for SSL.
hi mplx
how to use a proxy for SSL
need your help
there are plenty of reverse proxy containers available: for example, you could use jwilder/nginx-proxy as reverse proxy with jrcs/letsencrypt-nginx-proxy-companion for automatically handling letsencrypt certificates for you; when you got it running you would just need to add some environment variables to your pixelfed docker container like in this project; another popular option for an reverse proxy is traefik; at the end of the day it depends on your setup.
hi mplx
I tried for a few days, but there are problems, and I need your help. My current situation is that I can enter the home page and the registration page, but I ca n’t proceed to the next step when logging in on the login page.
my docker-compose's file is
version: '2'
services:
web:
image: mplx/docker-pixelfed:master
env_file:
- ./pixelfed.env
environment:
- VIRTUAL_PORT=80
- VIRTUAL_HOST=pixelfed.example.com,192.168.255.150
- LETSENCRYPT_HOST=dotnet1.nginx-test.com
- LETSENCRYPT_EMAIL=someone@simple.com
volumes:
- /cloud/pixelfed/data:/home/project/pixelfed/storage
depends_on:
- mysql
- redis
mysql:
image: mysql:5.7
ports:
- "3306:3306"
env_file: ./mysql.env
volumes:
- /cloud/pixelfed/mysql:/var/lib/mysql
redis:
image: redis:4-alpine
ports:
- "6379:6379"
volumes:
- /cloud/pixelfed/redis:/data
nginx:
restart: always
image: nginx
container_name: nginx
ports:
- 80:80
- 443:443
volumes:
- /etc/nginx/conf.d
- /etc/nginx/vhost.d
- /usr/share/nginx/html
- /etc/nginx/certs:/etc/nginx/certs:ro
nginx-gen:
restart: always
image: jwilder/docker-gen
container_name: nginx-gen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- /etc/nginx/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
volumes_from:
- nginx
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s
/etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt-nginx-proxy-companion
volumes_from:
- nginx
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /etc/nginx/certs:/etc/nginx/certs:rw
environment:
- NGINX_DOCKER_GEN_CONTAINER=nginx-gen
my pixelfed.env's file is
APP_NAME="Pixelfed"
APP_ENV=production
APP_KEY=123456789A123456789B123456789C12
APP_DEBUG=false
APP_URL=http://pixelfed.example.com
APP_DOMAIN=pixelfed.example.com
ADMIN_DOMAIN=pixelfed.example.com
SESSION_DOMAIN=pixelfed.example.com
SESSION_SECURE_COOKIE=true
TRUST_PROXIES="*"
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=pixelfed
DB_USERNAME=pixelfed
DB_PASSWORD=pixelfedpassword
BROADCAST_DRIVER=log
CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_DRIVER=redis
REDIS_SCHEME=tcp
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_FROM_ADDRESS="pixelfed@example.com"
MAIL_FROM_NAME="Pixelfed"
MAIL_DRIVER=smtp
MAIL_HOST=mail.example.com
MAIL_PORT=587
MAIL_USERNAME=user@example.com
MAIL_PASSWORD=emailpassword
MAIL_ENCRYPTION=tls
IMAGE_DRIVER=imagick
OPEN_REGISTRATION=true
ENFORCE_EMAIL_VERIFICATION=true
PF_MAX_USERS=100
MAX_ACCOUNT_SIZE=1000000
MAX_PHOTO_SIZE=15000
MAX_CAPTION_LENGTH=300
MAX_BIO_LENGTH=300
MAX_NAME_LENGTH=25
MAX_ALBUM_LENGTH=8
IMAGE_QUALITY=80
OAUTH_ENABLED=true
STORIES_ENABLED=true
ACTIVITY_PUB=false
REMOTE_FOLLOW=false
AP_REMOTE_FOLLOW=false
ACTIVITYPUB_INBOX=false
AP_INBOX=false
ACTIVITYPUB_SHAREDINBOX=false
PF_COSTAR_ENABLED=true
CS_BLOCKED_DOMAINS='example.org,example.net'
CS_CW_DOMAINS='example.org,example.net'
CS_UNLISTED_DOMAINS='example.org,example.net'
Can you refer to your configuration files? Is there a way to start with one click and go to the login page? Thank you very much
hi mplx
This website cannot provide a secure connection. The response sent by pixelfed.example.com is invalid. ERR_SSL_PROTOCOL_ERROR
My configuration is as follows
[root@192 docker-pixelfed]# cat docker.yml version: '3.7'
services: web: image: mplx/docker-pixelfed:master ports:
[root@192 docker-pixelfed]# cat pixelfed.env APP_NAME="Pixelfed" APP_ENV=production APP_KEY=123456789A123456789B123456789C12 APP_DEBUG=false
APP_URL=https://192.168.255.150 APP_DOMAIN=192.168.255.150 ADMIN_DOMAIN=192.168.255.150 SESSION_DOMAIN=192.168.255.150 SESSION_SECURE_COOKIE=true TRUST_PROXIES="*"
LOG_CHANNEL=stack
DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=pixelfed DB_USERNAME=pixelfed DB_PASSWORD=pixelfedpassword
BROADCAST_DRIVER=log CACHE_DRIVER=redis SESSION_DRIVER=redis QUEUE_DRIVER=redis
REDIS_SCHEME=tcp REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379
MAIL_FROM_ADDRESS="pixelfed@example.com" MAIL_FROM_NAME="Pixelfed" MAIL_DRIVER=smtp MAIL_HOST=mail.example.com MAIL_PORT=587 MAIL_USERNAME=user@example.com MAIL_PASSWORD=emailpassword MAIL_ENCRYPTION=tls
IMAGE_DRIVER=imagick
OPEN_REGISTRATION=true ENFORCE_EMAIL_VERIFICATION=true PF_MAX_USERS=100
MAX_ACCOUNT_SIZE=1000000 MAX_PHOTO_SIZE=15000 MAX_CAPTION_LENGTH=300 MAX_BIO_LENGTH=300 MAX_NAME_LENGTH=25 MAX_ALBUM_LENGTH=8 IMAGE_QUALITY=80
OAUTH_ENABLED=true STORIES_ENABLED=true
ACTIVITY_PUB=false REMOTE_FOLLOW=false AP_REMOTE_FOLLOW=false ACTIVITYPUB_INBOX=false AP_INBOX=false ACTIVITYPUB_SHAREDINBOX=false PF_COSTAR_ENABLED=true CS_BLOCKED_DOMAINS='example.org,example.net' CS_CW_DOMAINS='example.org,example.net' CS_UNLISTED_DOMAINS='example.org,example.net'
192.168.255.150 is my virtual machine,What do I need to log in and use the normal functions, I really appreciate your help and answers