932
server { listen 80; server_name funcom.co.kr www.funcom.co.kr; return 301 https://$host$request_uri; } server { listen 443 ssl; server_name funcom.co.kr www.funcom.co.kr; ssl_certificate /etc/letsencrypt/live/funcom.co.kr/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/funcom.co.kr/privkey.pem; root /funcomwww/funcom.co.kr; index index.php index.html index.htm; try_files $uri $uri/ /index.php?q=$uri&$args; location ~ /wp-content/(?<path>.+)\.(?<ext>jpe?g|png|gif)$ { if ($http_accept !~* "image/webp") { break; } add_header Vary Accept; add_header Cache-Control "private" always; expires 365d; try_files /wp-content/uploads-webpc/$path.$ext.webp $uri =404; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 300; } location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; access_log off; add_header Cache-Control "public"; } location ~* \.(?:css|js)$ { expires 1y; access_log off; add_header Cache-Control "public"; } # xmlrpc.php 막기 location = /xmlrpc.php { deny all; } }
conf 설정에 한참을 헤메다 하나를 제대로 설정하니 이젠 모두 제대로 설정된다.
funcom.conf 파일 완벽하게 설정해서 백업해놓는다…😀