Gitlab pages returning 502 Bad Gateway
Summary
Added pages_external_url to /etc/gitlab/gitlab.rb and reconfigured, create a simple test project with just an index file, getting 502 error on pages url
Steps to reproduce
- vim /etc/gitlab/gitlab.rb
- pages_external_url 'http://my.url'
- sudo gitlab-ctl reconfigure
Relevant logs and/or screenshots
/opt/gitlab/sv/gitlab-pages/run
2017/02/22 21:01:18 GitLab Pages Daemon 0.3.1 (c13e845)
2017/02/22 21:01:18 URL: https://gitlab.com/gitlab-org/gitlab-pages
2017/02/22 21:01:18 Running the daemon as unprivileged user (uid:1000, gid: 1000)...
2017/02/22 21:01:18 Starting the daemon as unprivileged user (uid: 1000, gid: 1000)...
2017/02/22 21:01:18 failed to listen on FD 5: file file+net [socket]: getsockopt: socket operation on non-socket
2017/02/22 21:01:18 exit status 1
lsof -i :8090
returns nothing
Files are present at /var/opt/gitlab/gitlab-rails/shared/pages/attiks/plain/public
more /var/opt/gitlab/nginx/conf/gitlab-pages.conf
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
## Lines starting with two hashes (##) are comments with information.
## Lines starting with one hash (#) are configuration parameters that can be uncommented.
##
###################################
## configuration ##
###################################
server {
listen *:80;
server_name ~^(?<group>.*)\.my\.url$;
server_tokens off; ## Don't show the nginx version number, a security best practice
## Disable symlink traversal
disable_symlinks on;
## Individual nginx logs for this GitLab vhost
access_log /var/log/gitlab/nginx/gitlab_pages_access.log gitlab_access;
error_log /var/log/gitlab/nginx/gitlab_pages_error.log;
# Pass everything to pages daemon
location / {
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 http;
proxy_pass http://localhost:8090;
}
# Define custom error pages
error_page 403 /403.html;
error_page 404 /404.html;
}