We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Reverse Proxy to other Servers Domain
Reverse Proxy to other Servers Domain
Hi,
I want use Vestacp with Nginx as Reverse Proxy.
I have 2 Server with 2 Domains. I want, if i visit the reverse proxy Domain, display the Script from second Domain.
Things i have done:
Created 2 Files under "/usr/local/vesta/data/templates/web/nginx" :
reverseproxy.stpl
reverseproxy.tpl
I have choose the correct "reverseproxy" Theme for the Domain and have restart the nginx service, but nothing changed.
I work the first time with vestacp and reverse proxy, whats wrong?
Many Thanks
I want use Vestacp with Nginx as Reverse Proxy.
I have 2 Server with 2 Domains. I want, if i visit the reverse proxy Domain, display the Script from second Domain.
Things i have done:
Created 2 Files under "/usr/local/vesta/data/templates/web/nginx" :
reverseproxy.stpl
Code: Select all
server {
listen %ip%:%proxy_ssl_port%;
server_name %domain_idn% %alias_idn%;
ssl on;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
error_log /var/log/%web_system%/domains/%domain%.error.log error;
location / {
proxy_pass https://seconddomainwhatiwantdisplay.com/;
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location @fallback {
proxy_pass https://%ip%:%web_ssl_port%;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include %home%/%user%/conf/web/snginx.%domain%.conf*;
}
reverseproxy.tpl
Code: Select all
server {
listen %ip%:%proxy_port%;
server_name %domain_idn% %alias_idn%;
location / {
rewrite ^(.*) https://%domain_idn%$1 permanent;
}
}
I work the first time with vestacp and reverse proxy, whats wrong?
Many Thanks
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Reverse Proxy to other Servers Domain
reexplain what you want to achieve calling them ServerA SiteA and ServerB SiteB