【发布时间】:2017-07-16 23:46:56
【问题描述】:
昨天在 ubuntu 16.04 安装上进行了新的 gitlab 8.17.0 安装,并像我记录的旧版本一样对其进行配置。我正在运行一个 apache2,它让加密作为代理。看起来好像一切运行良好,但是没有加载一些 JS 文件。我在
处得到“422 Unprocessable Entity”https- 域/资产/webpack/application-XXX.js
- 域/资产/webpack/lib_dX.js
- 域/资产/webpack/users-X.js
- 域/资产/webpack/lib_d3-X.js
- 域/资产/webpack/users-X.js
/etc/gitlab/gitlab.rb
external_url 'https://gitlab.example.com'
nginx['listen_address'] = 'localhost'
nginx['listen_port'] = 8080
nginx['listen_https'] = false
web_server['external_users'] = ['www-data']
nginx['enable'] = false
/etc/apache2/sites-available/gitlab.example.com.conf
<VirtualHost *:80>
ServerName gitlab.example.com
ServerAdmin mail@gitlab.example.com
ErrorLog /var/log/apache2/gitlab.example.com/error.log
CustomLog /var/log/apache2/gitlab.example.com/access.log combined
Redirect 301 / https://gitlab.example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName gitlab.example.com
ServerAdmin mail@gitlab.example.com
ErrorLog /var/log/apache2/gitlab.example.com/error.log
CustomLog /var/log/apache2/gitlab.example.com/access.log combined
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
ProxyPreserveHost On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/gitlab.example.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/gitlab.example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/gitlab.example.com/chain.pem
<Proxy http://localhost:8080/>
Order deny,allow
Allow from all
</Proxy>
</VirtualHost>
有人有解决问题的想法吗?
谢谢!祝你有个愉快的星期天。
【问题讨论】:
标签: apache ubuntu ssl proxy gitlab