Gitlab called from a wrong url

Hi,

I’ve installed Gitlab recently and it is working very well. The point is that Gitlab is called from two urls. The first is the external url : gitlab.mydomain.com and the second is x.mydomain.com.

I do not know how it happened. I have two diffrent configuration.

Here’s the first Gitlab VH:

<VirtualHost *:80>
ServerName gitlab.mydomaain.com
ServerSignature Off

ProxyPreserveHost On

AllowEncodedSlashes NoDecode

<Location />
Require all granted
ProxyPassReverse http://x.x.x.1:8181
ProxyPassReverse http://gitlab.mydomain.com
</Location>

 RewriteEngine on

 RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
 RewriteCond %{REQUEST_URI} ^/uploads/.*
 RewriteRule .* http://127.0.0.1:8181%{REQUEST_URI} [P,QSA,NE]

 DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public

 ErrorDocument 404 /404.html
 ErrorDocument 422 /422.html
 ErrorDocument 500 /500.html
 ErrorDocument 502 /502.html
 ErrorDocument 503 /503.html

 LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
 ErrorLog /var/log/httpd/logs/YOUR_SERVER_FQDN_error.log
 CustomLog /var/log/httpd/logs/YOUR_SERVER_FQDN_forwarded.log common_forwarded
 CustomLog /var/log/httpd/logs/YOUR_SERVER_FQDN_access.log combined env=!dontlog
 CustomLog /var/log/httpd/logs/YOUR_SERVER_FQDN.log combined
</VirtualHost>

Any ideas please ?