fix custom subdomain

This commit is contained in:
Jean-Christian Denis 2024-11-23 20:10:32 +01:00
parent 03e0139082
commit b916743cc7
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
2 changed files with 5 additions and 3 deletions

View file

@ -12,9 +12,6 @@ client_max_body_size 32m;
if ($dc_blog_id = '') {
set $dc_blog_id default;
}
if ($dc_blog_id = 'stable') {
set $dc_blog_id default;
}
# Blogs public paths
location ~ /public {

View file

@ -9,6 +9,11 @@ server {
# - ...
server_name ~^(?<dc_blog_id>\w*?)?\.?(\w+\.\w+)$;
# Redirect a particular subdomain
if ($dc_blog_id = 'blog') {
set $dc_blog_id default;
}
# To use custom configuration only use
# include /etc/nginx/snippets/snippets_common.conf;
# Adapt to your needs here the content of