gpt4 book ai didi

subdomain - 如何将 robots.txt 与 gitlab 和 apache + 子域一起使用?

转载 作者:行者123 更新时间:2023-12-04 19:37:18 26 4
gpt4 key购买 nike

我无法访问我的 robots.txt(位于/home/git/gitlab/public/robots.txt)
我关注了this recipe用于在 centos + apache 上安装

我已经尝试排除 robots.txt 但这还不够这是我当前的 gitlab VirtualHost

<VirtualHost git.domain.tld:80>                                              
ServerName git.domain.tld
ServerSignature Off
ProxyPreserveHost On

<Location />
Order deny,allow
Allow from all

ProxyPassReverse http://127.0.0.1:8080
ProxyPassReverse http://git.domain.tld/
</Location>

#apache equivalent of nginx try files
# http://serverfault.com/questions/290784/what-is-apaches-equivalent-of-nginxs-try-files
# http://stackoverflow.com/questions/10954516/apache2-proxypass-for-rails-app-gitlab

RewriteEngine on

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f

RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
# needed for downloading attachments
DocumentRoot /home/git/gitlab/public


#Set up apache error documents, if back end goes down (i.e. 503 error) then a maintenance/deploy page is thrown up.
ErrorDocument 404 /404.html
ErrorDocument 422 /422.html
ErrorDocument 500 /500.html
ErrorDocument 503 /deploy.html

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
ErrorLog /var/log/httpd/logs/gitlab_error.log
CustomLog /var/log/httpd/logs/gitlab_forwarded.log common_forwarded
CustomLog /var/log/httpd/logs/gitlab_access.log combined env=!dontlog
CustomLog /var/log/httpd/logs/gitlab.log combined
</VirtualHost>

最佳答案

努力改变/home/git/gitlab/config/environments/production.rbconfig.serve_static_assets = true(默认为false)

关于subdomain - 如何将 robots.txt 与 gitlab 和 apache + 子域一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23364975/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com