You are not logged in.
Hello,
apache doesn't execute CGI script from userdir.
here is httpd-userdir.conf:
UserDir public_html
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
<Directory "/home/*/public_html/cgi-bin/">
Options ExecCGI
SetHandler cgi-script
</Directory>
the error message is
End of script output before headers: test.cgi
test.cgi is simple script :
#!/bin/bash
printf 'Content-type: text/html\n\n'
echo "</head><body>"
echo "<p><pre>"
echo "peu importe..."
echo "</pre></p>"
echo "</body>
</html>"
it's correctly executed from /srv/http/cgi-bin/
I added
LoadModule cgi_module modules/mod_cgi.so
in /etc/httpd/conf/httpd.conf
what else could I tell you so you help me ?
thanks in advance.
Last edited by N_BaH (2015-12-30 21:47:27)
Offline
I have never written a CGI script, but should it not also contain an opening <html> and <head> tag?
This might also explain the error message.
Offline
the exact same script works from /srv/http/cgi-bin/
I added missing tags, but still it doesn't work from userdir.
Offline
my bad : I misconfigured user's group.
now fixed,everything works fine.
sorry for the noise, and thanks again.
Offline