regarding nginx optimization
in the later part part is suggested to add
location / {
proxy_pass http://127.0.0.1/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_temp_path /etc/nginx/proxy_temp;
}
now, im using php application, so should all be going inside
location ~ \.php$
or
location /
as the guide states?
also can i put all inside main nginx config file /etc/nginx/nginx.conf inside http block? would that work as same?
thanks in advance.