Upstream url not showing.
January 21, 2019 10:13AM
Hi Team,

I am new to Nginx. My configuration below with LB and ssl.

When I am hitting url, it is redirecting properly without a port. I want url with a port. Below is my configuration.

Could anyone help and do the needful.

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;
upstream testserver{

server {
listen 80;
listen 443 ssl;
ssl_certificate /usr/local/nginx/ssl/localhost.crt;
ssl_certificate_key /usr/local/nginx/ssl/localhost.key;
#server_name localhost;
server_name testserver;
if ($scheme != "https") {
return 301 https://$server_name/Test$request_uri;
server {
server_name testserver;
#charset koi8-r;
#access_log logs/host.access.log main;

# location / {
location / {
#root html;
#index index.html index.htm;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_pass https://testserver/Test/;

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
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