X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=posts%2Flinux-note.org;h=ee82bb774829c9389553ea9464073367be113303;hb=2313a178e9ee6c47000abcb095b5536f585bdfc7;hp=1878acbffa25b1be2aaf8f20b2db70fc7138c82f;hpb=93c731adebc5c2770ac869d53add87f3f6324d6c;p=blog.git 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/