Change basepath + port of running docker container to use HTTPS
Is your feature request related to a problem?
Hello,
I really love the project so far! It was really easy to setup and works great ❤️
I do not have much experience regarding Docker. I got memos running by using the command in your documentation:
docker run -d --name memos -p 5230:5230 -v ~/.memos/:/var/opt/memos neosmemo/memos:latest
Describe the solution you'd like
Using that, memos is accessible via http://mydomain:5320. However, I want to use serve it under something like https://mydomain/memos (i.e. https://mydomain/memos:443).
Is this possible somehow without rebuilding the container?
I saw that there are config files in /var/lib/docker/containers/ but I have no idea what to change there to make that happen (or if that's even possible there)
Additional context
No response
try
docker run -d --name memos -p 443:5230 -v ~/.memos/:/var/opt/memos neosmemo/memos:latest
The best way is to enable HTTPS by nginx.
try
docker run -d --name memos -p 443:5230 -v ~/.memos/:/var/opt/memos neosmemo/memos:latest
But then we cannot have other applications on that port. We would need a simple reverse-proxy, I guess!
try
docker run -d --name memos -p 443:5230 -v ~/.memos/:/var/opt/memos neosmemo/memos:latest
But then we cannot have other applications on that port. We would need a simple reverse-proxy, I guess!
Exactly, I run my blog there as well. Therefore, I would need another base path/reroute (however it's called).
I am aware that I can probably reroute it somehow via my webserver but I do not really want to mess too much around there.
I just experimented, it seems the most basic version works:
server {
listen 80;
listen [::]:80;
server_name yourmemosdomain.com;
location / {
proxy_pass http://localhost:5230/;
}
}
and for apache
<VirtualHost *:80>
ServerName memos.com
AllowEncodedSlashes On
ProxyPreserveHost On
ProxyPass "/" "http://localhost:5230/"
</VirtualHost>
I just experimented, it seems the most basic version works:
server { listen 80; listen [::]:80; server_name yourmemosdomain.com; location / { proxy_pass http://localhost:5230/; } }and for apache
<VirtualHost *:80> ServerName memos.com AllowEncodedSlashes On ProxyPreserveHost On ProxyPass "/" "http://localhost:5230/" </VirtualHost>
Nice, thanks! I will try that later 🙂
ok, lol I ended up creating a directory called memo inside of my /var/www. In that I added an .htaccess with a redirect.
RewriteEngine On
RewriteRule ^ http://mydomain.com:5230/ [L,R=301]
Now I can access memos via: mydomain.com/memo
First, I wanted to have a subdomain for it, but my certificate does not support that.
fiddling around with the apache settings did not work for me. Maybe because my server setup is a little strange in another place 😄
I'm fine with the setup right now :) Thanks all!