[pmwiki-users] pmwiki-users Digest, Vol 107, issue 9
Jont Allen
jontalle at illinois.edu
Wed May 21 20:56:01 CDT 2014
This is a "resend" as I had the wrong "Reply-To"
Jont
Dear Petko,
I am very happy to try again, but there are SO many possibilities, that
I couldnt try them all. Furthermore I was confused about several things,
that I suspect/hope you can clear up immediately.
Can we go 1 step at a time?
That first step is apache config.
The second step is the wiki config.
I attache my config.php stripped of comments. I had tried
$EnablePathInfo = 1;
along with "alias /wiki"
but that was the line that seemed to introduce the instability wrt
skins. The skin problem was for everything, not just uploads. The skins
randomly stopped working once I added this option.
1) You mention the index.php:.
WHAT I HAVE NOW: /var/www/index.php
<?php chdir('./wiki/'); include_once('pmwiki.php');
In the past: /var/www/wiki/index.php contained
<?php include_once('pmwiki.php');
but it had no effect so I removed it.
There is a: /var/www/wiki/pmwiki.php
2) These lines are commented and dont seem relevant to my problems:
> ## uncomment below if skins/attached files seem broken
> # $FarmPubDirUrl = $PubDirUrl =
'http://hear.beckman.illinois.edu/wiki/pub';
> # $UploadUrlFmt = 'http://hear.beckman.illinois.edu/wiki/uploads';
3) I own the system and have root, so I configure apache directly, with
the config file rather than use .htaccess? From my reading of the docs,
apache strong recomends that the admin (me) config apache, rather than
scatter about many .htaccess files. Is that your understanding as well?
In otherwords, what ever can go in a .htaccess file, can alternatively
go in the config file. I have been operating under this guidance by the
apache docs. If my assumption is wrong, where do I put the .htaccess
file, in /var/www/ or /var/www/wiki/ ?
So my assumption, and question is, can I put all the rewrite rules in
the apache config file? I'm asking about the following rules:
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]
I did not try this, mostly because I didn't understand it. I am very
happy to do it, but would like to keep all such rules in one place, such
as the config file. Else it all becomes so scattered I cant figure out
whats going on 6 mos from now.
2) On my ubuntu system, this apache config file is:
/etc/apache2/sites-available/default
In that file I have placed the following lines (plus many others ...):
<VirtualHost *:80>
ServerAdmin jont at mimosaacoustics.com
DocumentRoot /var/www
<IfModule mod_access.c>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
</IfModule>
...
#block .htaccess: <--- note these are commented out
# AllowOverride None
# Order allow,deny
# allow from all
# </Directory>
... blah blah
#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 where the main problem seems to be: <--NOTE comment
#This almost worked but was unstable, The skins to randomly failed.
# "Alias /wiki ..." worked with $EnablePathInfo = 1;,
# Alias lines:
# <IfModule mod_alias.c>
# Alias /wiki /var/www/wiki/pmwiki.php
# </IfModule>
<Directory /var/www/wiki.d/>
Options +Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from All
</Directory>
<Directory /var/www/wiki/Courses/ECE5372013SpeechProcessing/>
Options +Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from All
</Directory>
<Directory /var/www/wiki/uploads/>
Options -Indexes FollowSymLinks
Allow from All
</Directory>
...
Thats it for now. I await your resp.
Thank you for your help.
Jont
On 05/21/2014 12:00 PM, pmwiki-users-request at pmichaud.com wrote:
> Send pmwiki-users mailing list submissions to
> pmwiki-users at pmichaud.com
>
> Today's Topics:
>
> 1. Re: pmwiki-users Digest, Vol 107, Issue 8 (Petko Yotov)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 21 May 2014 06:38:57 +0200
> From: Petko Yotov <5ko at 5ko.fr>
> To: pmwiki-users at pmichaud.com
> Subject: Re: [pmwiki-users] pmwiki-users Digest, Vol 107, Issue 8
> Message-ID: <cone.1400647137.558773.1170.1000 at pc4>
> Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8"
>
> I've been using the URL rewriting method on many sites for many years.
>
> Here is an example .htaccess file that may work for you:
>
> 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]
>
> This is like the Example 2 on the CleanUrls page, modified to match your
> directory name (wiki instead of pmwiki) and your lack of index.php file.
>
> And, in config.php, set these variables:
>
> # set clean urls hear.beckman.illinois.edu/Courses/ECE537
> $EnablePathInfo = 1;
> $ScriptUrl = 'http://hear.beckman.illinois.edu';
>
> ## uncomment below if skins/attached files seem broken
> # $FarmPubDirUrl = $PubDirUrl =
'http://hear.beckman.illinois.edu/wiki/pub';
> # $UploadUrlFmt = 'http://hear.beckman.illinois.edu/wiki/uploads';
>
> Petko
>
> Jont Allen writes:
>> Dear Petko,
>> I tried all the methods on
>> http://www.pmwiki.org/wiki/Cookbook/CleanUrls
>>
>> The alias method looked like it was going to work, but was unstable.
I would
>> get an error, and then the skin was lost, and I had to turn off the
alias to
>> recover. It also stopped rendering the LaTeX scripts.
>> I just couldn't get it to be stable.
>>
>> In the end, the best I could do is
>> http://hear.beckman.illinois.edu/?n=Courses.ECE537-2013SpeechProcessing
>>
>> There are two problems: I cannot get rid of "/n=" and
>> Courses.ECE537
>> should have been
>> Courses/ECE537
>>
>> The . -> / is not a big deal, but I would really love to remove the
"/n=" as
>> students will be confused by this syntax.
>>
>> The option
>> $EnablePathInfo = 1;
>> did not do it once I got rid of the /wiki/config.php/ part of the URL.
>>
>> Are there more robust methods of doing this?
>>
>> Jont Allen
>>
>>
>>> Today's Topics:
>>>
>>> 1. Re: help with name resolution (Petko Yotov)
>>
>>> ----------------------------------------------------------------------
>>>
>>> Message: 1
>>> Date: Mon, 19 May 2014 19:50:48 +0200
>>> From: Petko Yotov <5ko at 5ko.fr>
>>> To: pmwiki-users at pmichaud.com
>>> Subject: Re: [pmwiki-users] help with name resolution
>>> Message-ID: <cone.1400521848.804036.26376.1000 at pc4>
>>> Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8"
>>>
>>> Will any of the described methods on this page be of some interest?
>>>
>>> http://www.pmwiki.org/wiki/Cookbook/CleanUrls
>>>
>>> Petko
>>>
>>> Jont Allen writes:
>>>> Dear pmwiki-users
>>>> Im having a name resolution problem. I dont know if the problem is
with php
>>>> or apache.
>>>>
>>>>
>>>> My wiki is at
>>>> http://hear.beckman.illinois.edu/
>>>>
>>>> This method resolves a desired page:
>>>> http://hear.beckman.illinois.edu/wiki/pmwiki.php?
>>>> n=Courses.ECE537-2013SpeechProcessing
>>>>
>>>> But when I try to resolve the same page this way:
>>>>
http://hear.beckman.illinois.edu/wiki/Courses/ECE5372013SpeechProcessing
>>>>
>>>> it fails with an apache2 error
>>>> requested URL /wiki/Courses/ECE5372013SpeechProcessing was not
found on this
>>>> server.
>>>>
>>>> The wiki is installed at:
>>>> /var/www/wiki/
>>>>
>>>> /var/www/wiki# ls
>>>> cookbook docs index.php local LS-LR pmwiki.php pub scripts
TODO.txt
>>>> uploads uploads.tgz wiki.d wikilib.d
>>>>
>>>> ls -l wiki.d/Courses.ECE537-2013SpeechProcessing
>>>> gives the content file:
>>>> /var/www/wiki# ls -l wiki.d/Courses.ECE537-2013SpeechProcessing
>>>> -rw-r--r-- 1 root root 109610 Dec 25 22:32
>>>> wiki.d/Courses.ECE537-2013SpeechProcessing
>>>>
>>>> On to /etc/apache2:
>>>> the config file says:
>>>>
>>>> <Directory /var/www/wiki/>
>>>> Options +Indexes FollowSymLinks MultiViews
>>>> AllowOverride None
>>>> Order allow,deny
>>>> allow from All
>>>> </Directory>
>>>>
>>>> <Directory /var/www/wiki.d/>
>>>> Options +Indexes FollowSymLinks MultiViews
>>>> AllowOverride None
>>>> Order allow,deny
>>>> allow from All
>>>> </Directory>
>>>>
>>>> <Directory /var/www/wiki/Courses/ECE5372013SpeechProcessing/>
>>>> Options -Indexes FollowSymLinks MultiViews
>>>> AllowOverride None
>>>> Order allow,deny
>>>> allow from All
>>>> </Directory>
>>>>
>>>> I did:
>>>> /etc/init.d/apache2 restart
>>>> * Restarting web server apache2
>>>>
>>>> What am I doing wrong
>>>> Is this a pmwiki or apache2 problem?
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> pmwiki-users mailing list
>>>> pmwiki-users at pmichaud.com
>>>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
> ------------------------------
>
> End of pmwiki-users Digest, Vol 107, Issue 9
> ********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20140521/2f8924dd/attachment.html>
More information about the pmwiki-users
mailing list