Can anyone help me please with editing nginx.conf
according to the tasks below. I've done the basic configuration. Here a list of options that must be set also (I haven't done it yet):
1.Image files should be served by nginx with "Expires: 21 days" header added
2.Logging of requests to "/somelogo.ico" should be disabled. All other requests should be proxied to another web server running on
local IP address on port 8080
3.Virtual host should accept requests to all "test.org" subdomains;
Here my nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
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/test.org/access.log main;
server {
location / {
root /var/www/test.org/html;
}
location /images/ {
root /var/www/test.org/images;
}
}
}