Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info

master
Joey Hess 2009-09-27 18:34:50 -04:00
commit 1a366910d3
3 changed files with 68 additions and 4 deletions

View File

@ -0,0 +1,32 @@
[[!tag patch wishlist]]
If I install ikiwiki in a user directory (let's say /home/bruno/ikiwiki) with all perl modules (thoses coming from Bundle::Ikiwiki and Bundle::Ikiwiki:Extras) inside that directory (in /home/bruno/ikiwiki/lib/perl5) then the generated CGI wrapper does not work even if I make libdir point to that directory. The error reported explain that wrapper <code>Can't locate IkiWiki.pm in @INC</code>.
This is bad when you try to install Ikiwiki in such a way (everything needed by ikiwiki in one single directory) since ikiwiki is unusable in such case.
Situations where this behavior (everything in one directory) may be wanted include installing latest ikiwiki on Debian stable, Ubuntu or more simply installing it on any hosting provider without root access.
Here is a simple patch correcting that behavior.
<pre>
---
IkiWiki/Wrapper.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm
index ff110b5..5289966 100644
--- a/IkiWiki/Wrapper.pm
+++ b/IkiWiki/Wrapper.pm
@@ -121,6 +121,7 @@ $check_commit_hook
$envsave
newenviron[i++]="HOME=$ENV{HOME}";
newenviron[i++]="WRAPPED_OPTIONS=$configstring";
+ newenviron[i++]="PERL5LIB=$config{libdir}";
newenviron[i]=NULL;
environ=newenviron;
--
1.6.0.4
</pre>
-- [[/users/bbb]]

View File

@ -0,0 +1,36 @@
Is it possible to have any missing pages(404's) redirected to the search(omega) ?
So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au)
##DONE
I use nginx instead of apache.
Just add the following to the `server` block outside of any location block in nginx.conf
You must also make sure you have setup and enabled the search plugin(omega)
error_page 404 /ikiwiki.cgi?P=$uri;
My full nginx.conf
server {
listen [::]:80; #IPv6 capable
server_name www.lunix.com.au;
access_log /var/log/nginx/www.lunix.com.au-access.log main;
error_log /var/log/nginx/www.lunix.com.au-error.log warn;
error_page 404 /ikiwiki.cgi?P=$uri;
location / {
root /home/lunix/public_html/lunix;
index index.html index.htm;
}
location ~ ikiwiki\.cgi$ {
root /home/lunix/public_html/lunix;
include /etc/nginx/fastcgi_params.cgi;
fastcgi_pass 127.0.0.1:9999;
fastcgi_param SCRIPT_FILENAME /home/lunix/public_html/lunix$fastcgi_script_name; # same path as above
}
}

View File

@ -1,4 +0,0 @@
Is it possible to have any missing pages(404's) redirected to the search(omega) ?
So if someone comes to my site with http://example.com/foo_was_here it would result in 'foo_was_here' being passed as a search parameter to omega ? --[Mick](http://www.lunix.com.au)