From 2313a178e9ee6c47000abcb095b5536f585bdfc7 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Thu, 9 Mar 2017 02:14:14 +0800 Subject: [PATCH] update --- Makefile | 3 +-- index.org | 2 +- posts/linux-note.org | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 44afc99..f1f4d12 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,7 @@ all: # used for automation on server update: - git pull - $(emacs) -Q --script blog.el "~/www/html" "true" + git pull && $(emacs) -Q --script blog.el "~/www/html" "true" test: $(emaca) -Q --script blog.el "test" "true" diff --git a/index.org b/index.org index 652f899..9865177 100644 --- a/index.org +++ b/index.org @@ -9,5 +9,5 @@ Welcome to Peng's Personal Wiki * Blog -- [[file:Blog-with-org-mode.org][Blow with Org-mode]] +- [[file:posts/Blog-with-org-mode.org][Blow with Org-mode]] - [[file:git-note.org][Git Note]] diff --git a/posts/linux-note.org b/posts/linux-note.org index 1878acb..ee82bb7 100644 --- a/posts/linux-note.org +++ b/posts/linux-note.org @@ -61,6 +61,24 @@ https://forums.virtualbox.org/viewtopic.php?t=15679 - add user to virtualbox group * Apache config +** Enabled Cgi mode +To enable cgi mdoule, create symbolic link to mods-available/cgid.conf /etc/apache2/mods-enabled/ +https://perlmaven.com/perl-cgi-script-with-apache2 + +Add sample perl script to test, put under =/usr/lib/cgi-bin/= and chmod a+x, troubleshooting see the log =/var/log/apache2/error.log= +#+BEGIN_SRC perl + #!/usr/bin/perl -w + + use strict; + + use CGI qw/:standard/; + + print header, + start_html ("hello world"), + h1 ("hello"), + end_html; + +#+END_SRC ** cgi directory config #+BEGIN_SRC sh ScriptAlias /cgi-bin/ /var/cgi-bin/ -- 2.11.0