|
|
Subject: Re: trouble setting up wiki with MoinMoin 1.5.2 - msg#00080
On 17/03/2006, at 00:39, Emin Martinian wrote:
Basically I believe that the wikiconfig.py file is not being read.
Seems to be the problem.
I
tried looking in the source code, but I couldn't find where it imports
wikiconfig.py so I was unable to verify this.
Importing the config is more complicated than "import wikiconfig".
Check multiconfig.py if you want to see the details.
(By the way, I'm
assuming that the wikiconfig.py file is supposed to be in the same
directory as moin.cgi, but perhaps that is my error. I can't imagine
where else wikiconfig.py should go, though...).
wikiconfig can be anywhere. To make it importable, you must add the
path to the directory where it is located to sys.path. Look into
moin.cgi in the comments about setting the system path.
Best Regards,
Nir Soffer
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Thread at a glance:
Previous Message by Date:
Re: Correct value for "url_prefix" in "wikiconfig.py"
On 16/03/2006, at 23:06, Fred Drake wrote:
On 3/16/06, Kenneth McDonald <kenneth.m.mcdonald@xxxxxxxxxxxxx> wrote:
# This must be '/wiki' for twisted and standalone. For CGI, it should
# match your Apache Alias setting.
url_prefix = '/home/sites/home/web'
The value I have there right now is my system's DocumentRoot setting.
the httpd.conf doesn't include an Alias directive, so I'm not quite
sure
what I should do here.
DocumentRoot is a path on the local system; url_prefix is a path
within the browser-accessible web space. For instance, if your wiki
FrontPage is accessed as
http://www.example.net/mywiki/FrontPage
then url_prefix should be "/mywiki".
No! don't listen to Fred, you may loose your wiki :-)
url_prefix has nothing to do with your wiki name, and they should never
be the same.
url_prefix is the url prefix of moin static files (css and images). For
example:
http://yourdomain/wiki/modern/css/screen.css
While your wiki url look like this:
http://yourdomain/mywiki/pagename
Back to the question, how do you set this value? Just leave this as is,
"/wiki". This value is used by moin when it creates links to static
files (If you look into the html source, you will find those urls).
Now, what Apache is going to do with
"http://yourdomain/wiki/modern/css/screen.css"? there is no "wiki"
directory in your document root. Thats why you need the Alias
configuration:
Alias /wiki/ /usr/share/moin/htdocs/
This tell Apache that any url that starts with /wiki/, should be served
from the path "/usr/share/moin/htdocs/". This path should be adapted to
your installation.
Best Regards,
Nir Soffer
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Next Message by Date:
Re: Confused about Apache config
On 17/03/2006, at 02:16, Dan M wrote:
I've got MoinMoin installed under /usr/local/share/moin. I created a
directory /usr/local/share/moin/projects, with data/, underlay/, and
cgi-bin/ under that. I copied the appropriate files into data and
underlay, moin.cgi into cgi-bin, editted wikiconfig.py, and ln'd
wikiconfig.py into cgi-bin.
Now, in my Apache setup I've got a section that looks like:
<VirtualHost *:80>
ServerAdmin dan@xxxxxxxxxxxx
DocumentRoot <path to my doc root>
This should NOT point to "/usr/local/share/moin/projects" - or all your
sensitive data will be served by the web server. There is a big red
warning about that in the installation docs.
ServerName www.smurgle.net
ServerAlias smurgle.net
ErrorLog logs/smurgle.net-error_log
CustomLog logs/smurgle.net-access_log common
ScriptAlias /cgi-bin "<doc root>/cgi-bin"
This is wrong, just remove this line.
Alias /wiki/ "/usr/local/share/moin/htdocs/"
ScriptAlias /projects
"/usr/local/share/moin/projects/cgi-bin/moin.cgi"
These two lines look correct.
</VirtualHost>
I'm not sure what the "Alias" line is doing for me.
Look in my answer to Kenneth.
If I'm wanting to access the Wiki at /projects, do I want the "Alias"
line to reference "/projects"?
NO!
If I do that, I believe it will hide the Script Alias line.
Or ScriptAlias will hide the Alias. In any case, it won't work.
Best Regards,
Nir Soffer
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Previous Message by Thread:
trouble setting up wiki with MoinMoin 1.5.2
I'm having trouble setting up a wiki using MoinMoni version 1.5.2 and
python 2.3.
After installing and following the instructions to create a wiki
instance in ~/public_html/mywiki, I keep getting
ConfigurationError
data_dir "/org/mywiki/data" does not exists, or has incorrect
ownership or permissions.
I have tried everything including setting the data_dir variable in
wikiconfig.py to the absolute path of my data directory and making the
data directory world readable/writable.
What I find especially strange is that the configuration error seems
to think that my data_dir is "/org/mywiki/data" but I never set it to
that and when I grep /usr/lib/python2.3/site-packages/MoinMoin for
that string, it does not exist.
Basically I believe that the wikiconfig.py file is not being read. I
tried looking in the source code, but I couldn't find where it imports
wikiconfig.py so I was unable to verify this. (By the way, I'm
assuming that the wikiconfig.py file is supposed to be in the same
directory as moin.cgi, but perhaps that is my error. I can't imagine
where else wikiconfig.py should go, though...).
Thanks in advance,
-Emin Martinian
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
Next Message by Thread:
Re: trouble setting up wiki with MoinMoin 1.5.2
Thanks for the suggestion. The problem was indeed that I had not
set the path properly in moin.cgi. When I added a sys.path.insert
statement things worked properly.
Thanks,
-EminOn 3/17/06, Nir Soffer <nirs@xxxxxxxxxxxxx> wrote:
On 17/03/2006, at 00:39, Emin Martinian wrote:> Basically I believe that the wikiconfig.py file is not being read.Seems to be the problem.> I> tried looking in the source code, but I couldn't find where it imports
> wikiconfig.py so I was unable to verify this.Importing the config is more complicated than "import wikiconfig".Check multiconfig.py if you want to see the details.> (By the way, I'm
> assuming that the wikiconfig.py file is supposed to be in the same> directory as moin.cgi, but perhaps that is my error. I can't imagine> where else wikiconfig.py should go, though...).wikiconfig can be anywhere. To make it importable, you must add the
path to the directory where it is located to sys.path. Look intomoin.cgi in the comments about setting the system path.Best Regards,Nir Soffer
|
|