php.ini에서 최대 업로드 허용량을 늘려줬는데도 1메가 이상의 이미지 업로드시 HTTP Error가 계속되었는데 알고보니 nginx의 업로드 허용량이 1메가라서 이부분을 수정해줘야 한다.

`/etc/nginx/nginx.conf`

http괄호 안에 넣어주었다.
client_max_body_size 10m;

“`php
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘;

access_log /var/log/nginx/access.log main;

sendfile on;
#tcp_nopush on;

keepalive_timeout 65;

#gzip on;
client_max_body_size 10m;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}

“`

Tags : #nginx #wordpress