Gitlab Pages: 404, and work fine after restart gitlab or restart gitlab pages
Summary
when I deploy the new gitlab pages project, I got 404, it reminds me that "The page you're looking for could not be found.The resource that you are attempting to access does not exist or you don't have the necessary permissions to view it.Make sure the address is correct and that the page hasn't moved.Please contact your GitLab administrator if you think this is a mistake."
When I go to the store path /var/opt/gitlab/gitlab-rails/shared/pages
, I can see the deploy files! But I got 404 pages.
After I restart the gitlab or run the command 'gitlab-ctl restart gitlab-pages' to restart gitlab-pages, it works fine!
And the old project work fine too, Only the new gitlab pages project, I alway got 404 unless I restart the gitlab or gitlab-pages
Steps to reproduce
use the following .gitlab-ci.yml
pages:
stage: deploy
tags:
- shell
script:
- mkdir .public
- cp -r * .public
- mv .public public
artifacts:
paths:
- public
only:
- master
use the following gitlab.rb
external_url 'http://gitlab.levii.cn'
nginx['listen_port'] = 80
pages_external_url "http://levii.art"
gitlab_pages['access_control'] = true
commit the repo and view the gitlab-pages link, I got 404 page
Example Project
example: http://gitlab.levii.cn/fujuewen/test10
pages link: http://fujuewen.levii.art/test10
What is the current bug behavior?
when I deploy the new gitlab pages project, I got 404
What is the expected correct behavior?
Expect to get the correct page
Results of GitLab environment info
sudo gitlab-rake gitlab:env:info
System information
System: CentOS 7.6.1810
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.6
Bundler Version:1.16.6
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.18.1
Sidekiq Version:5.2.3
Go Version: unknown
GitLab information
Version: 11.7.3-ee
Revision: d573592
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
DB Version: 9.6.11
URL: http://gitlab.levii.cn
HTTP Clone URL: http://gitlab.levii.cn/some-group/some-project.git
SSH Clone URL: git@gitlab.levii.cn:some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 8.4.4
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git