We’re running Gitlab with docker-compose and have the registry enabled. On our server where the docker container’s running we’re running a NGINX that proxy_pass https://our-registry.com to the port we have exposed the registry on. That works fine and all.
Our problem is that in the Gitlab UI it’s showing the registry URL as https://our-registry.com:5005.
Using the URL with that port will not work. How can we make the UI not show the port? We have already tried setting the registry_external_url to https://our-registry.com but without success.
Thanks in advance!
Removing the config below from gitlab.rb worked for me.
gitlab_rails['registry_port'] = "5005"
Related
I faced one issue when I tried to change my default port number for gitlab self-managed version. The screenshot below shows that the static files is not loaded when I changed the port number to 8080, default is 80. Someone please help me with this issue!!! Much appreciated!!!
*Ubuntu server 20.04.3 LTS on Dell Precision Tower 3640.
Assuming an Omnibus installation, it depends on how you did mody the default port.
It should be by Setting the NGINX listen port
nginx['listen_port'] = 8080
And you are supposed to run (possibly as root)
gitlab-ctl reconfigure
gitlab-ctl restart
Make sure, as in here, your external_url remain with HTTP.
I have a docker instance running apache on port 80 and node.js+express running on port 3000. I need to make an AJAX request from the apache-served website to the node server running on port 3000.
I don't know what is the appropiate url to use. I tried localhost but that resolved to the localhost of the client browsing the webpage (also the end user) instead of the localhost of the docker image.
Thanks in advance for your help!
First you should split your containers - it is a good practice for Docker to have one container per one process.
Then you will need some tool for orchestration of these containers. You can start with docker-compose as IMO the simplest one.
It will launch all your containers and manage their network settings for you by default.
So, imaging you have following docker-compose.yml file for launching your apps:
docker-compose.yml
version: '3'
services:
apache:
image: apache
node:
image: node # or whatever
With such simple configuration you will have host names in your network apache and node. So from inside you node application, you will see apache as apache host.
Just launch it with docker-compose up
make an AJAX request from the [...] website to the node server
The JavaScript, HTML, and CSS that Apache serves up is all read and interpreted by the browser, which may or may not be running on the same host as the servers. Once you're at the browser level, code has no idea that Docker is involved with any of this.
If you can get away with only sending links without hostnames <img src="/assets/foo.png"> that will always work without any configuration. Otherwise you need to use the DNS name or IP address of the host, in exactly the same way you would as if you were running the two services directly on the host without Docker.
I'm currently in the process of trying to get Gitlab omnibus installed on my private Debian server, and it works perfectly on port 80, the problem is I also have an Apache server listening on port 80. So I'm trying to get Nginx listening on port 8080 but for some reason I'm getting a
"502
Gitlab is not responding" Error
I have edited both "external_url" in gitlab.rb and also the port number under the server block in the nginx.conf file. and no joy.
If someone could help me that would be great!
Most likely you have another service listening on 8080, I think the omnibus install have some service hooking 8080 - just use 8081 instead.
Edit: I just did a quick search and found that it's the unicorn server that is listening to 8080 with the original omnibus installer.
Note: You will only need to change the external_url in gitlab.rb, no other config file should have to be edited for this.
Edit#2: As #emeraldjava stated there is an option in the configuration file for using another unicorn port: #unicorn['port'] = '8080'
I solved this for Gitlab Omnibus (Community Edition, version 10.1.4) by first setting these in /etc/gitlab/gitlab.rb:
unicorn['port'] = 8081
gitlab_workhorse['auth_backend'] = "http://localhost:8081"
Then running:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart
Additionally, if you are running GitLab behind an SSL reverse proxy, you may need to restart that service to get past the cached 502 error page.
Starting with GitLab 13.0, Puma is the default web server and Unicorn has been disabled by default(reference).
so you have to change following configs in /etc/gitlab/gitlab.rb :
external_url 'http://hostOrDomain:8080/'
puma['port'] = 8081
gitlab_workhorse['auth_backend'] = "http://localhost:8081"
I have a web running on Tomcat7 (installed on ubuntu 14.10). The application is available at localhost:8080/myapp.
I would like to access it with the url : myapp.com
I've tried many tutorials on the web (update server.xml by adding a , update /etc/hosts file, etc). None of them work.
If you know how I could achieve this, that would be great.
Thanks in advance!
Deploy your web application as a ROOT.war under webapps.
Open your server.xml and change the port from 8080 to 80.
Add below line to your host file.
127.0.0.1 myapp.com
Now try http://myapp.com
Hope this helps!
I have been spending days figuring out how to install the viral Ghost platform, and experienced numerous errors. Luckily, I have managed to install it - Ghost gives me a positive Ghost is running... message in SSH after I've done npm start --production. However, when I browse to my website - http://nick-s.se - Apache displays its default page and when I go to the ghost login area - /ghost, the site returns a 403 Forbidden.
P.S. I have specifically installed Ghost on a different port than the one Apache is running on. I don't know what's going on...
Update - I have found out that I can access my Ghost installation by adding the port number 2368 which I've configured in the config.js. Now, however my problem is - how can I run Ghost without using such ports?...
tell your browser you want to connect to the port Ghost is running on: http://nick-s.se:2368
So a few things, based on visiting:
1) It seems Apache isn't proxying the request onward to Ghost. Are you sure that you've configured it properly?
2) It also looks like Apache doesn't have access to the directory that you set as root. This shouldn't be necessary anyway if proxying is set up correctly, but could become an issue later if you wanted to use apache to serve things like the static assets.
If you are open to nginx instead of Apache, I have written a how to on this: link. You can skip the section on configuring Nginx. Otherwise, still might be useful if you figure out the conversion of rules from Nginx to Apache.
If you don't have any other sites running on your VPS you can just turn apache off and not have to deal with apache proxying the request to port 2368 and have Ghost run on port 80. If your VPS is running CentOS you can check out this how to on disabling apache and running Ghost on port 80.