Welcome! Log In Create A New Profile

Advanced

Re: RE: Two sites listening on same port simultaneously with different location (context) not workig

February 18, 2020 05:22PM
Thank you for your suggestion. I changed gitlab as follows and removed default from sites-enabled. This worked.

server {
listen 0.0.0.0:80 default_server;
listen [::]:80 default_server;
server_name abcd.com; ## Replace this with something like gitlab.example.com
server_tokens off; ## Don't show the nginx version number, a security best practice
root /var/www/html;

access_log /var/log/nginx/gitlab_access.log;
error_log /var/log/nginx/gitlab_error.log debug;

location / {
try_files $uri $uri/ =404;
}

location /gitlab {
client_max_body_size 0;
gzip off;
root /opt/gitlab/embedded/service/gitlab-rails/public;

proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;

proxy_set_header Host $http_host;
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 $scheme;

proxy_pass http://gitlab-workhorse;
}
}
Subject Author Posted

Two sites listening on same port simultaneously with different location (context) not workig

svgkraju February 18, 2020 04:53AM

RE: Two sites listening on same port simultaneously with different location (context) not workig

Reinis Rozitis February 18, 2020 06:18AM

Re: RE: Two sites listening on same port simultaneously with different location (context) not workig

svgkraju February 18, 2020 05:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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