0
저는 이것을 해결하려고 20hs와 같았습니다.hgweb.cgi 404 찾을 수 없음
나는 Redmine + Mercurial 시스템을 완벽하게 실행했다.
그럼 가상화하고 모든 것을 재설치했습니다.
Redmine은 이제 작동하지만 Mercurial은 작동하지 않습니다.
항상 404 찾을 수 없음 또는 500 내부 서버 오류 (저장소 이름이 나쁜 경우)가 발생합니다.
나는 Redmine 인증 제거를 포함하여 많은 것을 시도했다. 에서
repos.tracker.conf 사이트를 사용 :
<VirtualHost *:80>
ServerName repos.tracker.intranet.****.com.ar
DocumentRoot /var/www/repos.dev01/
ServerAlias www.repos.tracker.intranet.****.com.ar repos.****.com.ar
ServerAdmin [email protected]****.com.ar
LogLevel warn
ErrorLog /var/log/apache2/repos_error
CustomLog /var/log/apache2/repos_access combined
PerlLoadModule Apache2::Redmine
#PerlLoadModule Apache::DBI
ScriptAliasMatch "^/hg(.*)" "/opt/repos/hgwebdir.cgi$1"
<LocationMatch "^/hg">
AuthType Basic
AuthName "Redmine Mercurial Repository"
Require valid-user
#Redmine auth
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
RedmineDSN "DBI:mysql:database=redmine;host=127.0.0.1"
RedmineDbUser "redminedb"
RedmineDbPass "redminepass"
</LocationMatch>
</VirtualHost>
tracker.conf :
<VirtualHost *:80>
ServerAdmin [email protected]****.com.ar
ServerName tracker.intranet.****.com.ar
ServerAlias www.tracker.intranet.****.com.ar
DocumentRoot /var/www/dev01
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/dev01>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
/opt/repos/hgweb.cgi
#!/usr/bin/python2.7
#
# An example hgweb CGI script, edit as necessary
# See also https://www.mercurial-scm.org/wiki/PublishingRepositories
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/opt/repos/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(config)
wsgicgi.launch(application)
/옵션/repos/hgweb.config
,210권한 :
[email protected]:/opt/repos/hg# ls -la
total 16
drwxrw-r-- 4 www-data root 4096 ene 1 15:37 .
drwx------ 3 www-data root 4096 ene 1 15:37 ..
drwxrw-r-- 3 www-data root 4096 oct 5 21:35 animalizate
drwxrw-r-- 3 www-data root 4096 oct 5 22:11 mercurial-hooks