memos icon indicating copy to clipboard operation
memos copied to clipboard

feature: supports deploying memos to a subfolder of the domain name.

Open eaglexmw-gmail opened this issue 1 year ago • 5 comments

like this: [www.example.com/memos].

with nginx reverse config: proxy_pass http://xxx:5230/;

eaglexmw-gmail avatar Aug 29 '24 02:08 eaglexmw-gmail

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.

eaglexmw-gmail avatar Aug 29 '24 05:08 eaglexmw-gmail

@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;
}

eaglexmw-gmail avatar Sep 02 '24 07:09 eaglexmw-gmail

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;
}  

Issues-translate-bot avatar Sep 02 '24 07:09 Issues-translate-bot

@boojack

eaglexmw-gmail avatar Sep 30 '24 06:09 eaglexmw-gmail

Issue is not in English. It has been translated automatically.


@boojack

Issues-translate-bot avatar Sep 30 '24 06:09 Issues-translate-bot

https://github.com/usememos/memos/issues/4255 我提了一个issue,这个分支合并就可以关闭了

YU-7 avatar Jan 03 '25 01:01 YU-7

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.

Issues-translate-bot avatar Jan 03 '25 01:01 Issues-translate-bot