# Nginx Configuration # 아래 설정은 https 적용 이후 http -> https 이동에 사용됨. server { listen 80; server_name wiki.changwoo.pe.kr; return 301 https://$server_name$request_uri; } server { listen 80; server_name wiki.changwoo.pe.kr; client_max_body_size 32M; client_body_buffer_size 256k; root /media/storage/www-data/changwoo.pe.kr/wiki; index doku.php; # Remember to comment the below out when you're installing, and uncomment it when done. location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } # Uncomment this prevents images being displayed ! #location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { # expires 31536000s; # add_header Pragma "public"; # add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate"; # log_not_found off; #} location / { try_files $uri $uri/ @dokuwiki; } location @dokuwiki { rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last; rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last; rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last; rewrite ^/(.*) /doku.php?id=$1&$args last; } location ~ \.php { include snippets/fastcgi-php.conf; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; fastcgi_pass unix:/run/php/php7.0-fpm.sock; } location ~ /\.ht { deny all; } }