![我需要什么 Apache 配置来支持 Artifactory Docker?](https://linux22.com/image/650084/%E6%88%91%E9%9C%80%E8%A6%81%E4%BB%80%E4%B9%88%20Apache%20%E9%85%8D%E7%BD%AE%E6%9D%A5%E6%94%AF%E6%8C%81%20Artifactory%20Docker%EF%BC%9F.png)
Artifactory Docker 文档展示了如何将 nginx 配置为反向代理,但是等效的 Apache2 配置是什么?
特别是,以下语句的 apache 等价物是什么,它们是必要的吗?
- client_max_body_size 0; # 禁用任何限制以避免大图像上传出现 HTTP 413
- chunked_transfer_encoding on;# 需要避免 HTTP 411:请参阅问题 #1486(https://github.com/dotcloud/docker/issues/1486)
答案1
这是 Apache 配置:
<VirtualHost *:443>
ServerName artprod.company.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/artprod.company.com.pem
SSLCertificateKeyFile /etc/ssl/private/artprod.company.com.key
ProxyRequests off
ProxyPreserveHost on
ProxyPass / http://artprod.company.com:8080/artifactory/api/docker/<repository key>
ProxyPassReverse / http://artprod.company.com:8080/artifactory/api/docker/<repository key>
</VirtualHost>