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.
vesta at frontentd and at backend -> 404
vesta at frontentd and at backend -> 404
Hello,
I have VestaCP installed at frontend server and at backend server (both nginx + apache).
Backend web config is standart, frontend was, except proxy_pass https://[BACKEND SERVER IP]:443; in the location { }
The problem is that backend does not know real IP of the visitor.
Various manuals says the only thing is necessary to do is to add
somewhere in the nginx config. OK, but proxy_x_forwarded_proto is unknown, so skip it.
I added proxy_pass_header Set-Cookie; and it works, but when I'm adding any proxy_set_header instruction - all .php requests return error 404 with nothing strange in the logs. Could you please review this config?
P.S. the problem solved parsing ip list in x-forwarded-for in php script and removing the frontend IP from it, but I still need some config solution.
I have VestaCP installed at frontend server and at backend server (both nginx + apache).
Backend web config is standart, frontend was, except proxy_pass https://[BACKEND SERVER IP]:443; in the location { }
The problem is that backend does not know real IP of the visitor.
Various manuals says the only thing is necessary to do is to add
Code: Select all
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
I added proxy_pass_header Set-Cookie; and it works, but when I'm adding any proxy_set_header instruction - all .php requests return error 404 with nothing strange in the logs. Could you please review this config?
Code: Select all
server {
listen [THIS IP]:443;
server_name [THIS HOSTNAME];
ssl on;
ssl_certificate [SSL PATH];
ssl_certificate_key [SSL PATH];
error_log [PATH].log error;
location / {
proxy_pass https://[BACKEND SERVER IP]:443;
#proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header Host $http_host;
#proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_pass_header Set-Cookie;
#timeout in software 15 sec
#proxy_connect_timeout 5;
#proxy_send_timeout 10;
#proxy_read_timeout 10;
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|tif|tiff|css|js|htm|html|ttf|otf|webp|woff|txt|csv|rtf|doc|docx|xls|xlsx|ppt|pptx|odf|odp|ods|odt|pdf|psd|ai|eot|eps|ps|zip|tar|tgz|gz|rar|bz2|7z|aac|m4a|mp3|mp4|ogg|wav)$ {
root /home/[STATIC CONTENT PATH]/public_html;
access_log /var/log/apache2/[PATH].bytes bytes;
expires max;
try_files $uri @fallback;
}
}
Re: vesta at frontentd and at backend -> 404
Check or enable remoteip module
Code: Select all
a2enmod remoteip