Hi,
I just do some test before the deployment of my application and I got the Following error when attemting to execute a script.
here is the error I got
[Tue Aug 06 15:31:25.389867 2019] [cgi:error] [pid 21795] [client 83.7
+8.41.48:51364] End of script output before headers: cgi.cgi
[Tue Aug 06 15:34:05.945545 2019] [cgi:error] [pid 21797] [client 83.7
+8.41.48:51417] AH01215: (2)No such file or directory: exec of '/usr/l
+ib/cgi-bin/cgi.cgi' failed: /usr/lib/cgi-bin/cgi.cgi
[Tue Aug 06 15:34:05.945861 2019] [cgi:error] [pid 21797] [client 83.7
+8.41.48:51417] End of script output before headers: cgi.cgi
[Tue Aug 06 15:43:04.576601 2019] [mpm_prefork:notice] [pid 21790] AH0
+0169: caught SIGTERM, shutting down
[Tue Aug 06 15:44:55.853925 2019] [mpm_prefork:notice] [pid 22117] AH0
+0163: Apache/2.4.18 (Ubuntu) mod_perl/2.0.9 Perl/v5.22.1 configured -
+- resuming normal operations
[Tue Aug 06 15:44:55.853958 2019] [core:notice] [pid 22117] AH00094: C
+ommand line: '/usr/sbin/apache2'
[Tue Aug 06 15:45:02.206748 2019] [cgi:error] [pid 22123] [client 83.7
+8.41.48:51526] AH01215: (2)No such file or directory: exec of '/usr/l
+ib/cgi-bin/cgi.cgi' failed: /usr/lib/cgi-bin/cgi.cgi
[Tue Aug 06 15:45:02.207300 2019] [cgi:error] [pid 22123] [client 83.7
+8.41.48:51526] End of script output before headers: cgi.cgi
[Tue Aug 06 15:45:04.178975 2019] [cgi:error] [pid 22122] [client 83.7
+8.41.48:51528] AH01215: (2)No such file or directory: exec of '/usr/l
+ib/cgi-bin/cgi.cgi' failed: /usr/lib/cgi-bin/cgi.cgi
[Tue Aug 06 15:45:04.179385 2019] [cgi:error] [pid 22122] [client 83.7
+8.41.48:51528] End of script output before headers: cgi.cgi
This a fresh installation of Ubuntu, Apaache, mod perl, perl. And here is the Following code I'm trying to execute :
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "Hello world";
I also setted chmod +x to cgi.cgi but no change and the file exist in the directory /usr/lib/cgi-bin
My 000-default.conf contains :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/recordz
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include conf-available/serve-cgi-bin.conf
</VirtualHost>
serve-cgi-bin :
<IfModule mod_alias.c>
<IfModule mod_cgi.c>
Define ENABLE_USR_LIB_CGI_BIN
</IfModule>
<IfModule mod_cgid.c>
Define ENABLE_USR_LIB_CGI_BIN
</IfModule>
<IfDefine ENABLE_USR_LIB_CGI_BIN>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerM
+atch
Require all granted
</Directory>
</IfDefine>
</IfModule>
What do I've missed ??
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.