so i can just add a line within the server part of a vhost? for example here:
Code:
server {
listen 109.123.66.120:80;
server_name domain.com;
here
location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
proxy_pass http://0.0.0.0:8080;
proxy_redirect http://domain.com:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://0.0.0.0:8080;
proxy_redirect http://domain.com:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
root /var/www/.../data/www/...;
access_log /var/www/httpd-logs/community.heimtechnik.com.access.log;
error_page 404 = @fallback;
}
location @fallback {
proxy_pass http://0.0.0.0:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
or is there a way to place an include file in the conf.d directory and override parts in the server-part of the config?