memos
memos copied to clipboard
feature: supports deploying memos to a subfolder of the domain name.
like this: [www.example.com/memos].
with nginx reverse config: proxy_pass http://xxx:5230/;
hi, @boojack, I've done a new feature that supports deploying Memos under a subfolder of the domain name. Please review it and let me know if it can be merged into master.
@boojack 新特性:支持将memos部署到域名的子目录下; 特性同时支持部署在根目录与子目录,默认为部署在根目录。 部署到子目录下,nginx的配置类似如下即可:
location ^~ /memos/ {
# 注意: 反向代理后端 URL 的最后需要有一个路径符号
proxy_pass http://127.0.0.1:5230/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr; # 设置请求源地址
proxy_set_header X-Forwarded-Proto $scheme; # 设置Http协议
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
#expires 12h;
}
Issue is not in English. It has been translated automatically.
@boojack New feature: supports deploying memos to subdirectories of domain names; The feature supports deployment in both the root directory and subdirectories, and the default is deployment in the root directory. Deployed to a subdirectory, the nginx configuration is similar to the following:
location ^~ /memos/ {
# Note: The reverse proxy backend URL needs to have a path symbol at the end
proxy_pass http://127.0.0.1:5230/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr; # Set the request source address
proxy_set_header X-Forwarded-Proto $scheme; # Set Http protocol
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
add_header Cache-Control no-cache;
#expires 12h;
}
@boojack
Issue is not in English. It has been translated automatically.
@boojack
https://github.com/usememos/memos/issues/4255 我提了一个issue,这个分支合并就可以关闭了
Issue is not in English. It has been translated automatically.
https://github.com/usememos/memos/issues/4255 I raised an issue and this branch can be closed after merging it.