Control Web Panel
WebPanel => Apache => Topic started by: sappurit on October 18, 2021, 08:08:50 PM
-
/usr/local/apache/conf.d/mod_cgid.conf
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgid_module modules/mod_cgid.so
<IfModule cgid_module>
<Directory /home/*/public_html/cgi-bin/>
Options ExecCGI SymLinksifOwnerMatch
SetHandler cgi-script
AddHandler cgi-script .cgi .pl .py
Require all granted
AllowOverride All
</Directory>
</IfModule>
Work very well. But when I changed to
<Directory /home/*/public_html/>
It crash all accesses even-though .htm
-
Solved now! with the following code:
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgid_module modules/mod_cgid.so
<IfModule cgid_module>
<Directory "/home/*/public_html/">
Options +ExecCGI +Includes +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi .pl
Require all granted
AllowOverride All
</Directory>
</IfModule>
I saw in errorlog and search about:
[cgid:error] [pid 41348:tid 139847045981952] [client 49.237.xx.xxx:24894] End of script output before headers: index.cgi
and found the same problem at
https://stackoverflow.com/questions/28265735/apache-cgi-in-user-directory-end-of-script-output-before-headers
I checked the user public_html folder and found out that group was set to nobody.
Then I chgrp to the user group and chmod to 755.
Then all working.