Welcome! Log In Create A New Profile

Advanced

nginx reverse proxy and chrome

Posted by ckruijntjens 
nginx reverse proxy and chrome
September 21, 2021 03:10PM
Hi all,

I hope someone can help me with this one. i setup a revers nginx proxy and with firefox,ie browser everyting works as should.

However when i use google chrome browser the redirect does not work. I enter the url without http:// or https://

If i enter http:// then the redirect works in chrome. if i dont enter http:// before the link it wont redirect me. The issue is only with Chrome.
Re: nginx reverse proxy and chrome
September 21, 2021 03:58PM
i am using this configuration.

server {
listen 80;
server_name webmail.ckruijntjens.nl;
return 301 https://$server_name$request_uri/webapp;
}


server {
listen 443 http2;
server_name webmail.ckruijntjens.nl;
location / {

#location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
#expires 365d;
#}
proxy_ssl_session_reuse off;
proxy_pass https://192.168.2.8;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_ssl_server_name on;
proxy_ssl_verify off;

}
}


What am i trying to achive is that when i enter https://webmail.ckruijntjens.nl it also redirects me to the proxy_pass.

Now it shows me the welcome page from nginx.
Re: nginx reverse proxy and chrome
September 21, 2021 04:49PM
ckruijntjens Wrote:
-------------------------------------------------------
> i am using this configuration.
>
> server {
> listen 80;
> server_name webmail.ckruijntjens.nl;
> return 301 https://$server_name$request_uri/webapp;
> }
>
>
> server {
> listen 443 http2;
> server_name webmail.ckruijntjens.nl;
> location / {
>
> #location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
> #expires 365d;
> #}
> proxy_ssl_session_reuse off;
> proxy_pass https://192.168.2.8;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP
> $remote_addr;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
> proxy_redirect off;
> proxy_ssl_server_name on;
> proxy_ssl_verify off;
>
> }
> }
>
>
> What am i trying to achive is that when i enter
> https://webmail.ckruijntjens.nl it also redirects me to the
> proxy_pass.
>
> Now it shows me the welcome page from where the proxy is running nginx and not the proxy_pass machine?.
Sorry, you can't reply to this topic. It has been closed.

Online Users

Guests: 50
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready