Hey,
I’ve been running a Seafile PRO Docker instance for a long time. It used ports 80 and 443. So, fine. Now I want to host a website on the same server. I thought:
- Install Apache2
- Let it listen on port 80 for
project.example.com
- Redirect all other requests to Seafile Docker Instance aka ProxyPass
######################################################
seafile:
image: docker.seadrive.org/seafileltd/seafile-pro-mc:11.0-latest
container_name: seafile
ports:
- "8000:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /opt/dockers:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=MyStrongDBPassword
- TIME_ZONE=Europe/Berlin # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAILs= admin@example.com
- SEAFILE_ADMIN_PASSWORD=MyStrongPassword # Specifies Seafile admin password, default is 'asecret'
- SEAFILE_SERVER_LETSENCRYPT=false
- SEAFILE_SERVER_HOSTNAME=127.0.0.1
depends_on:
- db
- memcached
# - elasticsearch
networks:
- seafile-net
######################################################
I changed the listening port from 80 to 8000.
Then I created a vhost conf file:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName seafile.example.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
# Stuff for seafile server
ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]
# Stuff for seahub
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
ErrorLog ${APACHE_LOG_DIR}/seafile_error.log
CustomLog ${APACHE_LOG_DIR}/seafile_access.log combined
</VirtualHost>
My problem is:
- I can access “
project.example.com
”, but not the “seafile.example.com
”. The docker instance starts well, there are no errors. - Trying to access seahub UI over “externalIP:8000” redirects me to “
project.example.com
”
Any suggestion how I can config the vHost to access the Seafile Docker instance?