我有一个自托管的GitLab服务器,它通过Apache Proxy运行,并在Centos 7机器上使用最新版本。
所有GIT功能都正常工作,问题出现在Web界面上。我怀疑它有文件许可,但我无法找到更多相关信息。
我遇到的所有同情: - 下载项目归档返回并清空archive.zip - 预览已提交的图像将返回空图像(它没有错误,没有大小并显示损坏的图标图像)
以下是production.log的相关条目:
Started GET "/iot/visual-identity/blob/master/logo/logo(svetli).png" for *.*.*.* at 2016-06-01 08:15:51 +0200
Processing by Projects::BlobController#show as HTML
Parameters: {"namespace_id"=>"iot", "project_id"=>"visual-identity", "id"=>"master/logo/logo(svetli).png"}
Read fragment views/iot/visual-identity/f8925065549a84b58177358e5ae9aaa7c0b506bf/application_settings/1-20160510215916571808000/0/e2d1b561d6b1e6374a71e983d36f0a1a (0.3ms)
Completed 200 OK in 551ms (Views: 415.8ms | ActiveRecord: 34.3ms)
Started GET "/iot/visual-identity/raw/527cc71c13df532543758fe97c8d0a6c96bed703/logo/logo(svetli).png" for *.*.*.* at 2016-06-01 08:15:51 +0200
Processing by Projects::RawController#show as HTML
Parameters: {"namespace_id"=>"iot", "project_id"=>"visual-identity", "id"=>"527cc71c13df532543758fe97c8d0a6c96bed703/logo/logo(svetli).png"}
我附上了上传图片的截图:
Apache代理配置:
<VirtualHost *:443>
ServerName host.url
ServerAlias www.host.url
DocumentRoot /opt/gitlab/embedded/service/gitlab-rails/public
ServerAdmin admin@host.url
ErrorLog /var/www/host.url/error.log
CustomLog /var/www/host.url/requests.log combined
<IfModule mpm_peruser_module>
ServerEnvironment apache apache
</IfModule>
ServerSignature Off
ProxyPreserveHost On
RequestHeader set X_FORWARDED_PROTO 'https'
Header always add Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
ProxyPass /.well-known/ !
AllowEncodedSlashes NoDecode
<Location />
Order deny,allow
Allow from all
Require all granted
ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://host.url/
</Location>
ProxyTimeout 600
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_URI} ^/uploads/.*
RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA,NE]
SSLCertificateFile /etc/letsencrypt/live/host.url/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/host.url/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/host.url/chain.pem
</VirtualHost>