Я получаю эту ошибку при переходе по веб-адресу https://url/hg
Код: Выделить всё
[Sun Mar 24 00:01:38.012580 2024] [cgi:error] [pid 27229] [client 172.0.6.80:29010] AH01215: Traceback (most recent call last):: /var/www/cgi-hg/hgweb.cgi
[Sun Mar 24 00:01:38.012641 2024] [cgi:error] [pid 27229] [client 172.0.6.80:29010] AH01215: File "/var/www/cgi-hg/hgweb.cgi", line 21, in : /var/www/cgi-hg/hgweb.cgi
[Sun Mar 24 00:01:38.012665 2024] [cgi:error] [pid 27229] [client 172.0.6.80:29010] AH01215: application = hgweb(hgweb.config): /var/www/cgi-hg/hgweb.cgi
[Sun Mar 24 00:01:38.012701 2024] [cgi:error] [pid 27229] [client 172.0.6.80:29010] AH01215: AttributeError: 'function' object has no attribute 'config': /var/www/cgi-hg/hgweb.cgi
[Sun Mar 24 00:01:38.020877 2024] [cgi:error] [pid 27229] [client 172.0.6.80:29010] End of script output before headers: hgweb.cgi
Код: Выделить всё
#!/usr/bin/env python3
#
# An example hgweb CGI script, edit as necessary
# See also https://mercurial-scm.org/wiki/PublishingRepositories
# Path to repo or hgweb config to serve (see 'hg help hgweb')
#config = b"/var/www/cgi-hg/hgweb.config"
# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
#import sys; sys.path.insert(0, "/path/to/python/lib")
# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()
from mercurial import demandimport
demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(hgweb.config)
wsgicgi.launch(application)
Код: Выделить всё
[paths]
#VIRTUAL_PATH = /REAL/PATH
#mbel = /home/repos/mbel
admin = /home/repos/admin
mbepp = /home/repos/mbepp
mbepEditor = /home/repos/mbepEditor
monitor= /home/repos/monitor
solrproxy= /home/repos/solrproxy
mbep-data= /home/repos/mbep-data
mbep-util= /home/repos/mbep-util
mbep-editor= /home/repos/mbep-editor
installer=/home/repos/installer
updater=/home/repos/updater
[web]
style = gitweb
# descend = true
Код: Выделить всё
ScriptAliasMatch ^/hg(.*) /var/www/cgi-hg/hgweb.cgi/$1
Options ExecCGI FollowSymLinks Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
Options FollowSymLinks
AllowOverride None
Allow from all
Options FollowSymLinks
# AllowOverride None
Allow from all
# AuthType Basic
# AuthName "Mercurial repositories"
# AuthUserFile /home/repos/repospassword
# Require valid-user
спасибо, Скотт
Подробнее здесь: https://stackoverflow.com/questions/782 ... new-server
Мобильная версия