From 217141eb1a12d5f49616f907c127b74d9d9f0aab Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 16:43:50 -0400 Subject: --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/bugs/libdir_not_used_in_wrappers.mdwn (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn new file mode 100644 index 000000000..baca5750e --- /dev/null +++ b/doc/bugs/libdir_not_used_in_wrappers.mdwn @@ -0,0 +1,28 @@ +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 generated does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. + +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. + +
+---
+ 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
+
-- cgit v1.2.3 From 362033885f8eb68addd3ef5e53a22a772cfe5fd7 Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 16:48:04 -0400 Subject: --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn index baca5750e..d3baa0bfb 100644 --- a/doc/bugs/libdir_not_used_in_wrappers.mdwn +++ b/doc/bugs/libdir_not_used_in_wrappers.mdwn @@ -1,3 +1,5 @@ +[[!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 generated does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. 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. @@ -26,3 +28,5 @@ index ff110b5..5289966 100644 -- 1.6.0.4 + +-- [[/users/bbb]] -- cgit v1.2.3 From 40947d522ccdc4187fd6fcb16c5865085fe393c7 Mon Sep 17 00:00:00 2001 From: "http://bruno.boulgour.com/" Date: Sun, 27 Sep 2009 16:49:43 -0400 Subject: --- doc/bugs/libdir_not_used_in_wrappers.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/bugs/libdir_not_used_in_wrappers.mdwn b/doc/bugs/libdir_not_used_in_wrappers.mdwn index d3baa0bfb..05ccf44c9 100644 --- a/doc/bugs/libdir_not_used_in_wrappers.mdwn +++ b/doc/bugs/libdir_not_used_in_wrappers.mdwn @@ -1,6 +1,6 @@ [[!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 generated does not work even if I make libdir point to that directory. The error reported explain that wrapper Can't locate IkiWiki.pm in @INC. +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 Can't locate IkiWiki.pm in @INC. 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. -- cgit v1.2.3 From bfad3f23d07ab58502a507fcdaf9254b08f4f23d Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sun, 27 Sep 2009 18:05:52 -0400 Subject: rename forum/missing_pages_redirected_to_search.mdwn to forum/missing_pages_redirected_to_search-SOLVED.mdwn --- doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn | 4 ++++ doc/forum/missing_pages_redirected_to_search.mdwn | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn delete mode 100644 doc/forum/missing_pages_redirected_to_search.mdwn (limited to 'doc') diff --git a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn new file mode 100644 index 000000000..cd544ecaf --- /dev/null +++ b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn @@ -0,0 +1,4 @@ +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) + + diff --git a/doc/forum/missing_pages_redirected_to_search.mdwn b/doc/forum/missing_pages_redirected_to_search.mdwn deleted file mode 100644 index cd544ecaf..000000000 --- a/doc/forum/missing_pages_redirected_to_search.mdwn +++ /dev/null @@ -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) - - -- cgit v1.2.3 From ba4071bde21a199e77f15b54d8785debc69613e6 Mon Sep 17 00:00:00 2001 From: "http://certifi.ca/lunix" Date: Sun, 27 Sep 2009 18:06:19 -0400 Subject: updated with nginx solution --- .../missing_pages_redirected_to_search-SOLVED.mdwn | 34 +++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn index cd544ecaf..3af83396c 100644 --- a/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn +++ b/doc/forum/missing_pages_redirected_to_search-SOLVED.mdwn @@ -1,4 +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) +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 + } + } + -- cgit v1.2.3