Skip to content

Commit c522f4d

Browse files
author
karldonteljames
authored
Create memos.subdomain.conf.sample
Reverse proxy config for neos/moe memos using a subdomain
1 parent 1df50fd commit c522f4d

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

memos.subdomain.conf.sample

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
## Version 2024/02/13
2+
# make sure that your memos container is named memos
3+
# make sure that your dns has a cname set for memos
4+
5+
server {
6+
listen 443 ssl;
7+
listen [::]:443 ssl;
8+
9+
server_name memos.*;
10+
11+
include /config/nginx/ssl.conf;
12+
13+
client_max_body_size 0;
14+
15+
proxy_http_version 1.1;
16+
proxy_set_header Upgrade $http_upgrade;
17+
proxy_set_header Connection "upgrade";
18+
19+
# enable for ldap auth (requires ldap-location.conf in the location block)
20+
#include /config/nginx/ldap-server.conf;
21+
22+
# enable for Authelia (requires authelia-location.conf in the location block)
23+
#include /config/nginx/authelia-server.conf;
24+
25+
# enable for Authentik (requires authentik-location.conf in the location block)
26+
#include /config/nginx/authentik-server.conf;
27+
28+
location / {
29+
# enable the next two lines for http auth
30+
#auth_basic "Restricted";
31+
#auth_basic_user_file /config/nginx/.htpasswd;
32+
33+
# enable for ldap auth (requires ldap-server.conf in the server block)
34+
#include /config/nginx/ldap-location.conf;
35+
36+
# enable for Authelia (requires authelia-server.conf in the server block)
37+
#include /config/nginx/authelia-location.conf;
38+
39+
# enable for Authentik (requires authentik-server.conf in the server block)
40+
#include /config/nginx/authentik-location.conf;
41+
42+
include /config/nginx/proxy.conf;
43+
include /config/nginx/resolver.conf;
44+
set $upstream_app memos;
45+
set $upstream_port 5230;
46+
set $upstream_proto http;
47+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
48+
49+
}
50+
51+
location ~ ^(/api) {
52+
include /config/nginx/proxy.conf;
53+
include /config/nginx/resolver.conf;
54+
55+
set $upstream_app memos;
56+
set $upstream_port 5230;
57+
set $upstream_proto http;
58+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
59+
}
60+
61+
}

0 commit comments

Comments
 (0)