docker-dotclear/www/servers/subdomain.conf

30 lines
885 B
Text
Raw Normal View History

2024-11-24 12:55:58 +00:00
# docker-dotclear:*
# /var/www/dotclear/servers/subdomain.conf
# Nginx server by subdomains
server {
# By default, server URLs look like:
# - http://default.domain.tld/
# - http://blog2.domain.tld/
# - ...
server_name ~^(?<dc_blog_id>\w*?)?\.?(\w+\.\w+)$;
2024-11-24 13:51:52 +00:00
# Default URL and blog
if ($dc_blog_id = '') {
set $dc_blog_id default;
}
2024-11-24 12:55:58 +00:00
# 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
# /etc/nginx/snippets/snippets_subdomain.conf
# Then disable the Dotclear plugin DockerDotclear
# (or change their settings)
include /etc/nginx/snippets/snippets_subdomain.conf;
include /etc/nginx/snippets/snippets_common.conf;
}