Başlıktan da anlayacağınız üzere plesk te barınan bir domainime yani backendime başka başka bir sunucu ile reverse proxy yapmak istiyorum fakat yapamadım daha önce normal nginx veya apache de olan backend sunucuma yaptım fakat bu şekil yapamadım daha önce yapmış olan var ise iletişime geçebilirmi acaba
Yapamadım derken aldığınız hata nedir? Yaşadığınız sorun nedir? En basit haliyle şunu koyarak çalıştırın. {SITE_IP} ve {DOM} kısımlarını düzeltin yeterli.
server {
listen {SITE_IP}:80;
server_name {DOM} www.{DOM};
error_log /var/log/{DOM}_error_log;
access_log /var/log/{DOM}_access_log;
root {HOME}/public_html;
location ~*.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ {
expires 1M;
try_files $uri @backendsite;
}
location / {
error_page 405 = @backendsite;
add_header X-Cache "HIT from Backend";
proxy_pass http://{SITE_IP}:8081;
include proxy.inc;
}
location @backendsite {
internal;
proxy_pass http://SITE_IP:8081;
include proxy.inc;
}
location ~ .*\.(php|jsp|cgi|pl|py)?$ {
proxy_pass http://SITE_IP:8081;
include proxy.inc;
}
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
location = /apple-touch-icon.png { access_log off; log_not_found off; }
location = /apple-touch-icon-precomposed.png { access_log off; log_not_found off; }
location ^~ /.git { return 403; }
}