今では重荷がなくなったので...
git-svn-id: file:///srv/svn/repo/mai/trunk@71 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
19
example/mai.apache.conf
Normal file
19
example/mai.apache.conf
Normal 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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user