ÇØÇÇCGI ÀÔ´Ï´Ù.
Áö±Ý ±¸µ¿ÇÏ´Â À©µµ¿ì ¾ÆÆÄÄ¡ ¼¹ö¿¡ cgi ±¸µ¿ÀÌ ÀÌ»óÀÌ ¾ø´ÂÁö Å×½ºÆ®ºÎÅÍ Çغ¸½Ã±â ¹Ù¶ø´Ï´Ù.
¾Æ·¡ cgi Äڵ带 test.cgi·Î ÀúÀåÇϽŴÙÀ½ test.cgi¸¦ È£ÃâÇßÀ»¶§ Á¤»óÀûÀ¸·Î "test" ¸Þ¼¼Áö°¡ ³ª¿À´ÂÁö È®ÀÎÇغ¸¼¼¿ä.
perlÀÇ °æ·Î´Â ÀÚ½ÅÀÌ perlÀ» ¼³Ä¡ÇÑ °æ·Î·Î ¼öÁ¤À» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.
#!c:\Perl\bin\perl.exe ÀÌ·±½ÄÀÌ µÇ°ÚÁö¿ä.
[ÇÁ·Î±×·¥ÄÚµå]
#!/usr/bin/perl print "content-type:text/html\n\n"; print "test"; |
À§ cgi ÇÁ·Î±×·¥ÀÌ Á¤»óÀûÀ¸·Î ÀÛµ¿ÇÑ´Ù¸é awstats »çÀÌÆ®¿¡¼ ¹ßÃéÇÑ ¾Æ·¡ FAQ¸¦ Âü°íÇغ¸½Ã±â ¹Ù¶ø´Ï´Ù.
ÇÑ°¡Áö ÁÖÀÇÇϽǰÍÀº awstatsÀÇ °æ¿ì È®ÀåÀÚ°¡ pl ÀÎ cgi ÆÄÀÏÀ» ÁÖ·Î ±¸µ¿Çϱ⠶§¹®¿¡
httpd.conf ¼³Á¤¿¡¼ pl ÆÄÀϵµ cgi·Î ÀνÄÀÌ µÇµµ·Ï ¼ÂÆÃÀ» ÇÏ¼Å¾ß ÇÕ´Ï´Ù.
[Àοë±Û]FAQ-SET150 : INTERNAL ERROR 500 IN MY BROWSER FAQ-SET200 : ERROR "... COULDN'T CREATE/SPAWN CHILD PROCESS..." PROBLEM: AWStats seems to run fine at the command prompt but when ran as a CGI from a browser, I get an "Internal Error 500". I also also might have the following message in my Apache error log file (or in browser with Apache 2.0+): ...couldn't create/spawn child process: c:/mywebroot/cgi-bin/awstats.pl SOLUTION: First, try to run awstats.pl from command line to see if file is correct. If you get some syntax errors and use a Unix like OS, check if your file is a Unix like text file (This means each line end with a LF char and not a CR+LF char). If awstats.pl file runs correctly from command line, this is probably because your web server is not able to known how to run perl scripts. This problem can occur with Apache web servers with no internal Perl interpreter (mod_perl not active). To solve this, you must tell Apache where is your external Perl interpreter. For this, you have 2 solutions: 1) Add the following directive in your Apache httpd.conf config (or remove the # to uncomment it if line is already available) ScriptInterpreterSource registry Then restart Apache. This will tell Apache to look into the registry to find the program associated to .pl extension. 2) Other solution (not necessary if first solution works): Change the first line of awstats.pl file with the full path of your Perl interpreter. Example with Windows OS and ActivePerl Perl interpreter (installed in C:\Program Files\ActiveState\ActivePerl), you must change the first line of awstats.pl file with: #!c:/program files/activestate/activeperl/bin/perl |
[Àοë±Û]
FAQ-SET220 : CRASH WHILE RUNNING AWSTATS.PL OR PAGE CONTENT ONLY PARTIALY LOADED ON WINDOWS XP PROBLEM: Sometimes my browser (Most often IE6) crash while running awstats.pl with some AWStats configuration. With some other versions or browsers, page content is partialy loaded. SOLUTION: Problem was with WinXP and WinXPpro as documented at MS site Q317949; "Socket Sharing Creates Data Loss When Listen and Accept Occur on Different Processes" Result was that MSIE would crash or display nothing. Netscape and Opera handled the socket better but displayed the pages partially. The effect of the bug was more prononced as the page contents increased (above 30k). http://support.microsoft.com/default.aspx?scid=kb;EN-US;q317949 And also at Apache.org http://www.apache.org/dist/httpd/binaries/win32/ MS produced a Hotfix which is now included in SP1. |