Using NGINX server to protect your upload directory
X-Accel-Redirect/X-SendfileまたはForce Downloads**ダウンロードメソッドと共にNGINXサーバーを使用している場合、より良いセキュリティのためにこの設定を追加する必要があります:
# Protect WooCommerce upload folder from being accessed directly.
# You may want to change this config if you are using "X-Accel-Redirect/X-Sendfile" or "Force Downloads" method for downloadable products.
# Place this config towards the end of "server" block in NGINX configuration.
location ~* /wp-content/uploads/woocommerce_uploads/ {
if ( $upstream_http_x_accel_redirect = "" ) {
return 403;
}
internal;
}
また、リダイレクトのみのダウンロード方法を使用している場合の設定です:
# Protect WooCommerce upload folder from being accessed directly.
# You may want to change this config if you are using "Redirect Only" method for downloadable products.
# Place this config towards the end of "server" block in NGINX configuration.
location ~* /wp-content/uploads/woocommerce_uploads/ {
autoindex off;
}
お使いのウェブサーバーがわからない場合は、このサポートページへのリンクとともに、ホストにお問い合わせください。