401 error with gitlab pages on separate server

Hello,
I have 2 servers: one wiht gitlab and other with gitlab pages only.
If my project is public I can use gitlab pages without issue but as soon I use a projetc with access_control I have 401 error “You don’t have permission to access the resource.”.

My gitlab pages server is on http and I use external reverse proxy (not mine) to display gitlab pages in https.

pages_external_url 'https://gitlab-pages-public-url.fr'
gitlab_pages['listen_proxy'] = 'localhost:8090'
pages_nginx['enable'] = true
pages_nginx['listen_port'] = 80
pages_nginx['listen_https'] = false
gitlab_pages['access_control'] = true
gitlab_pages['gitlab_server'] = 'https://gitlab-public-url.fr'
gitlab_pages['internal_gitlab_server'] = 'https://myapp.gitlab.mydomain.fr'

Any idea to help me are welcome.
Thxs

Pascal

NB: I have same issue with http without reverse proxy :frowning: : 401 error

I use cas3 OmniAuth authentication

I fix my issue.

My gitlab page server couldn’t contact my https gitlab server (behind a RP) but could contact it in http with internal DNS name.
I add this in gitlab.rb of my gitlab pages server to fix this issue

gitlab_pages['env'] = {
  'http_proxy' => "http://myproxy.fr:8080",
  'https_proxy' => "http://myproxy.fr:8080"
}