Hi,
Thanks for your link. And I read the articles you linked but there’s no luck, too.
Anyway, I’ve just fixed my server failed to serve my site. So I think you may find the difference with https://starforum.us/index.php?mid=board&document_srl=11831 (original url) and https://starforum.us/board/11831 (shortened by rewrite, currently not working).
And this is working nginx rewrite config, you can find in 444 port (https://starforum.us:444/board/11831)
# reserve XE Layout Template Source File (*.html)
rewrite ^/(layouts|m.layouts)/(.+)/(.+).html$ /index.php last;
# conf, query, schema
rewrite ^/(modules|addons|widgets)/(.+)/(conf|queries|schemas)/(.+).xml$ /index.php last;
# static files
rewrite ^/(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*) /files/$2/$3 last;
rewrite ^/(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*) /$2/$3 last;
# rss, blogAPI
rewrite ^/(rss|atom)$ /index.php?module=rss&act=$1 last;
rewrite ^/([a-zA-Z0-9_]+)/(rss|atom|api)$ /index.php?mid=$1&act=$2 last;
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$ /index.php?vid=$1&mid=$2&act=$3 last;
# trackback
rewrite ^/([0-9]+)/(.+)/trackback$ /index.php?document_srl=$1&key=$2&act=trackback last;
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$ /index.php?vid=$1&document_srl=$2&key=$3&act=trackback last;
# administrator page
rewrite ^/admin/?$ /index.php?module=admin last;
# document permanent link
rewrite ^/([0-9]+)$ /index.php?document_srl=$1 last;
# mid link
rewrite ^/([a-zA-Z0-9_]+)/?$ /index.php?mid=$1 last;
# mid + document link
rewrite ^/([a-zA-Z0-9_]+)/([0-9]+)$ /index.php?mid=$1&document_srl=$2 last;
# vid + mid link
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ /index.php?vid=$1&mid=$2 last;
# vid + mid + document link
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$ /index.php?vid=$1&mid=$2&document_srl=$3 last;
# mid + entry title
rewrite ^/([a-zA-Z0-9_]+)/entry/(.+)$ /index.php?mid=$1&entry=$2 last;
# vid + mid + entry title
rewrite ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$ /index.php?vid=$1&mid=$2&entry=$3 last;
And this is previously working caddy beta 9 caddyfile.
{
experimental_http3
}
starforum.us, www.starforum.us {
templates
encode gzip zstd
file_server
root * /home/starforum/html
php_fastcgi unix//home/php.sock
matcher a {
path_regexp a ^/(layouts|m.layouts)/(.+)/(.+).html$
}
rewrite match:a /index.php
matcher b {
path_regexp b ^/(modules|addons|widgets)/(.+)/(conf|queries|schemas)/(.+).xml$
}
rewrite match:b /index.php
matcher c {
path_regexp c ^/(.+)/files/(member_extra_info|attach|cache|faceOff)/(.*)
}
rewrite match:c /files/{http.matchers.path_regexp.c.2}/{http.matchers.path_regexp.c.3}
matcher d {
path_regexp d ^/(.+)/(files|modules|widgets|widgetstyles|layouts|m.layouts|addons)/(.*)
}
rewrite match:d /{http.matchers.path_regexp.d.2}/{http.matchers.path_regexp.d.3}
matcher e {
path_regexp e ^/(rss|atom)$
}
rewrite match:e /index.php?module=rss&act={http.matchers.path_regexp.e.1}
matcher f {
path_regexp f ^/([a-zA-Z0-9_]+)/(rss|atom|api)$
}
rewrite match:f /index.php?mid={http.matchers.path_regexp.f.1}&act={http.matchers.path_regexp.f.2}
matcher g {
path_regexp g ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(rss|atom|api)$
}
rewrite match:g /index.php?vid={http.matchers.path_regexp.g.1}&mid={http.matchers.path_regexp.g.2}&act={http.matchers.path_regexp.g.3}
matcher h {
path_regexp h ^/([0-9]+)/(.+)/trackback$
}
rewrite match:h /index.php?document_srl={1}&key={2}&act=trackback
matcher i {
path_regexp i ^/([a-zA-Z0-9_]+)/([0-9]+)/(.+)/trackback$
}
rewrite match:i /index.php?vid={http.matchers.path_regexp.i.1}&document_srl={http.matchers.path_regexp.i.2}&key={http.matchers.path_regexp.i.3}&act=trackback
matcher j {
path_regexp j ^/admin/?$
}
rewrite match:j /index.php?module=admin
matcher k {
path_regexp k ^/([0-9]+)$
}
rewrite match:k /index.php?document_srl={http.matchers.path_regexp.k.1}
matcher l {
path_regexp l ^/([a-zA-Z0-9_]+)/?$
}
rewrite match:l /index.php?mid={http.matchers.path_regexp.l.1}
matcher m {
path_regexp m ^/([a-zA-Z0-9_]+)/([0-9]+)$
}
rewrite match:m /index.php?mid={http.matchers.path_regexp.m.1}&document_srl={http.matchers.path_regexp.m.2}
matcher n {
path_regexp n ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$
}
rewrite match:n /index.php?vid={http.matchers.path_regexp.n.1}&mid={http.matchers.path_regexp.n.2}
matcher o {
path_regexp o ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([0-9]+)$
}
rewrite match:o /index.php?vid={http.matchers.path_regexp.o.1}&mid={http.matchers.path_regexp.o.2}&document_srl={http.matchers.path_regexp.o.3}
matcher p {
path_regexp p ^/([a-zA-Z0-9_]+)/entry/(.+)$
}
rewrite match:p /index.php?mid={http.matchers.path_regexp.p.1}&entry={http.matchers.path_regexp.p.2}
matcher q {
path_regexp q ^/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/entry/(.+)$
}
rewrite match:q /index.php?vid={http.matchers.path_regexp.q.1}&mid={http.matchers.path_regexp.q.2}&entry={http.matchers.path_regexp.q.3}
}
And I don’t know how to log request URI by adding code in index.php.