このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
- 03 Zed editor 設定 [Windowsでビルド]
- 09 ↷ 50_dialy:2025:09:09 から 50_dialy:2025:09:08 へページを名称変更しました。
- 06 ↷ 50_dialy:2025:06 から 50_dialy:2025:09:06 へページを移動しました。
最近の更新
文書の過去の版を表示しています。
SSL付きのDokuwiki
https://docs.linuxserver.io/images/docker-dokuwiki
docker-compose.yml
---
version: "2.1"
services:
https-portal:
image: steveltn/https-portal:1
ports:
- '80:80'
- '443:443'
links:
- dokuwiki
#restart: always
restart: unless-stopped
environment:
DOMAINS: 'dokuwiki.fl8.jp -> http://dokuwiki'
#STAGE: 'local'
STAGE: 'production'
#FORCE_RENEW: 'true'
dokuwiki:
image: ghcr.io/linuxserver/dokuwiki
container_name: dokuwiki
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Tokyo
volumes:
- ./config:/config
#ports:
# - 80:80
# - 443:443 #optional
restart: unless-stopped
https-portalからforwardされてくるので、X-Forwared-Forからアクセス元IPを取得し、real_ipとしてセットする。
config/nginx/nginx.conf
set_real_ip_from 172.18.0.0/16; real_ip_header X-Forwarded-For;
config/nginx/nginx.conf
fastcgi_cache_path /config/cache/nginx levels=1:2 keys_zone=cache-zone:30m max_size=2048M inactive=600m; fastcgi_cache_key "$scheme$request_method$host$request_uri";
config/nginx/site-confs/default
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
set $do_not_cache 0;
# -- POST or HEAD ?
if ($request_method != "GET") {
set $do_not_cache 1;
}
fastcgi_cache cache-zone;
fastcgi_cache_valid 200 60m;
add_header X-F-Cache $upstream_cache_status;