J'ai eu du mal à faire fonctionner Mercurial avec Apache sur Windows XP.Exécution Mercurial avec Apache sur Windows XP
J'ai lu et essayé les suggestions suivantes aux fils SO: 1, 2, 3 & 4
Jusqu'à présent, tout ce que je peux est une page blanche et quand je vois la source que je peux voir:
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font>
Qu'est-ce que je travaille avec:
- Apache 2,2-
C:\Program Files\Apache Software Foundation\Apache2.2\
- Python 2.4 (tel que recommandé par le site Mercurial) -
C:\Program Files\Python\2.4\
- Mercurial 1,6 -
C:\Program Files\Mercurial\
mod_python
3.3.1- Apache DocumentRoot:
C:\htdocs\hg\
accessible viahttp://hg.paperclip.dev
(ajouté au fichier hosts) - Hg Repository (sur un lecteur en réseau):
H:\repo\
J'ai l'impression qu'une partie de la complication est que je avoir mon repo sur un lecteur en réseau. Ce que je peux accéder soit par une lettre de lecteur en réseau H ou via \\SERVER\WebDev\repo\
Mon mercurial.ini
dans le répertoire d'installation Mercurial est comme suit:
[ui]
editor = Notepad
username = paperclip <[email protected]>
Mon hgweb.config
dans le Hg DocumentRoot servis par apache (C:\htdocs\hg\
)
[collections]
//SERVER/WebDev/repo = //SERVER/WebDev/repo**
Mon hgweb.cgi
dans le serverd Hg DocumentRoot par apache (C:\htdocs\hg\
)
#!C:/Program Files/Python/2.4/python.exe
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "C:/htdocs/hg/hgweb.config"
# Uncomment and adjust if Mercurial is not installed system-wide:
import sys; sys.path.insert(0, "C:/Program Files/Mercurial/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
from flup.server.fcgi import WSGIServer
application = hgweb(config)
WSGIServer(application).run()
Mes fichiers VirtualHosts pour Apache
<VirtualHost *:80>
ServerName hg.paperclip.dev
#ServerAlias paperclip.com *.paperclip.com
ServerAdmin [email protected]
CustomLog "logs/hg-access.log" combined
ErrorLog "logs/hg-error.log"
RewriteEngine on
RewriteRule (.*) C:/htdocs/hg/hgweb.cgi/$1
# Or we can use mod_alias for starting CGI script and making URLs "nice":
# ScriptAliasMatch ^(.*) C:/htdocs/hg/hgweb.cgi/$1
<Directory "C:/htdocs/hg/">
Order allow,deny
Allow from all
AllowOverride All
Options ExecCGI FollowSymLinks +Indexes
AddHandler cgi-script .cgi
</Directory>
</VirtualHost>
Compte tenu de la configuration ci-dessus, j'apprécieraient quelques suggestions pour obtenir ce travail. Tout ce que je pourrais essayer comme j'ai atteint une impasse totale.
Merci beaucoup à l'avance.
-P.