server {
listen 80 default;
disable_symlinks if_not_owner from=$root_path;
set $root_path /var/www/$http_host;
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
root $root_path;
error_page 404 = @fallback;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
listen 80 default_server;
return 404;
}
server {
listen 80;
server_name example.com www.example.com;
...
}
# cd /usr/share/zabbix-server-mysql/
# gunzip < schema.sql.gz | mysql -uroot -p zabbix
# gunzip < images.sql.gz | mysql -uroot -p zabbix
# gunzip < data.sql.gz | mysql -uroot -p zabbix