Jont Allen writes:
Yes, but it is probably better to keep them with the PmWiki installation,
and to keep your Apache installation as close to the standard as possible. I
would. This way, if some day you need to migrate your wiki to a different
hosting, eg. a faster/larger server or a low cost shared hosting provider,
your wiki will work very easily.
I do understand your point. However I get confused if the files are in too
many places. I only touch these file once a year, or so, so my long term
memory fails.
To place it in the apache config file, place it in a section like this:
<Directory /var/www/>
Options -Indexes FollowSymLinks
RewriteEngine On
RewriteBase /
# ...etc., copy from below
</Directory>
RewriteEngine On
RewriteBase /
RewriteRule ^$ /wiki/pmwiki.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([A-Z0-9\x80-\xFF].*)$ /wiki/pmwiki.php?n=$1 [QSA,L]
#PMWIKI JBA
#JBA changed -Indexes to +Indexes so to see ECE493...
<Directory /var/www/wiki/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from All
</Directory>
This is not needed and potentially dangerous as it unprotects locally
protected directories.
I changed the +Indexes to -Indexes
The university asked that I add this, but when was not working, I had
changed the - to +. Is this ok now?
Not completely. "-Indexes" disallows the listings of directories, where
there is no index.html or index.php file, but does not disallow downloading
of the files in those directories. The problem comes from the lines
AllowOverride None, Order allow,deny, allow from All that leave sensitive
directories unprotected. With these lines, if we want to protect a directory
like wiki.d, cookbook or local, we cannot, because your Apache setting
disallows overriding the "Allow from all" directive.
You need to allow per-directory override that protects individual
directories. Use AllowOverride All, or simply remove AllowOverride None.
This whole section should not be needed, you can remove it or comment it
out.
<Directory /var/www/wiki.d/>
Options +Indexes FollowSymLinks MultiViews
Options -Indexes FollowSymLinks MultiViews <--change
AllowOverride None
Order allow,deny
allow from All
</Directory>
This one wiki.d needs to be removed or changed. You actually leave your
wiki.d directory unprotected and anyone can get all pages and history
without any password.
I'll change to -Indexes (the univ security asked for this)
Idem.
If you use RewriteRules instead of Alias, your installation will be more
portable, as more hosting providers allow URL rewriting than Aliases.
Portable is great, but right now its failing. I can switch to portable once
its working.
This is what I wrote 5 days ago:
http://www.pmichaud.com/pipermail/pmwiki-users/2014-May/062322.html
All parts of the configuration must be done for CleanUrls to work. If either
URL rewriting is not enabled, or if $ScriptUrl is not set, or if
$EnablePathInfo is not set, it will not work.
$ScriptUrl = 'http://hear.beckman.illinois.edu/';
$EnablePathInfo = 1; #Option on
Namely, I turned on the EnablePathInfo since scriptUrl was already set.
Once this option is on, I cannot access my pages.
Here is the apache2 error message, which actualy looks useful:
[Sun May 25 15:55:52 2014] [error] [client 50.81.134.248] File does not
exist: /var/www/Courses, referer: http://hear.beckman.illinois.edu/?
n=Courses.ECE537-2013SpeechProcessing
It is true, /var/www/Courses does not exist. Maybe that means
ScriptUrl is set wrong (as you have suggested at the top)
Yes, this error happens because the URL rewriting is not yet enabled.
URL rewriting tells Apache that when a file/dir does not exist and looks
like a PmWiki page, to redirect it to PmWiki.
The $EnablePathInfo and $ScriptUrl parts tell PmWiki how to construct and
output URLs of other wiki pages.
The $FarmPubDirUrl and $PubDirUrl parts tell PmWiki how to construct and
output URLs to the skin configuration, styles and some cookbook recipes. You
don't need to define these if everything seems to work fine.
The $UploadUrlFmt part tells PmWiki how to construct and output URLs of
attached files. You don't need to enable these if you can download attached
files linked from the wiki pages.
You need to enable at least URL rewriting for Apache (config or .htaccess),
$EnablePathInfo = 1; and $ScriptUrl = "http://hear.beckman.illinois.edu";
(local/config.php, note it ends with .edu not .edu/ ).
You're almost there... :-)
Petko
_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users