今では重荷がなくなったので...

git-svn-id: file:///srv/svn/repo/mai/trunk@71 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
yakumo.izuru
2025-04-17 18:18:24 +00:00
parent 82044b1469
commit 446156597f
23 changed files with 106 additions and 249 deletions

19
example/mai.apache.conf Normal file
View File

@@ -0,0 +1,19 @@
<VirtualHost *:80>
ServerName mai.example.com
ServerAlias mai.example.com
RewriteEngine on
RewriteCond %{SERVER_NAME} =mai.example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName mai.example.com
ServerAlias mai.example.com
SSLEngine on
SSLCertificateFile /usr/pkg/etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /usr/pkg/etc/letsencrypt/live/example.com/privkey.pem
ProxyRequests off
ProxyPass / http://127.0.0.1:5000/
ProxyPassReverse / http://127.0.0.1:5000/
ProxyPreserveHost On
</VirtualHost>

View File

@@ -1,4 +1,19 @@
[http]
# TCP socket to listen on.
# Must not be already used by something else.
listen = 127.0.0.1:5000
# How many requests per minute are allowed
# before a rate-limit happens.
requests = 10
[mai]
listen = "127.0.0.1:5000"
rootdir = "./static"
tmplpath = "./views"
# Drop privilege to the user and group specified.
# When only the user is specified, the default group of the user will
# be used.
#
# user = www
# group = www
[paths]
# Where to locate resources such as CSS, etc
static = ./static
# Where to locate the pages to be served
templates = ./views

View File

@@ -1,7 +1,7 @@
server {
listen 80;
listen [::]:80;
server_name mai.example.com;
server_name mai.example.org;
location / {
return 301 https://$host$request_uri;
@@ -11,7 +11,7 @@ server {
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name mai.example.com;
server_name mai.example.org;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;