CGI script does not execute but displays content after installing mooshak
I recently downloaded and installed mooshak on Ubuntu 14.04. I followed all the steps on the Requirements and Installations page.
When I try to access http://localhost/~mooshak
, I am redirected to http://localhost/~mooshak/cgi-bin/execute
and the following content is displayed:
#!/bin/sh
# the next line restarts using tclsh \
PATH=$PATH:/usr/local/bin:/usr/contrib/bin ; exec tclsh "$0" "$@"
#-*-Mode: TCL; iso-accents-mode: t;-*-
cd ../..
lappend auto_path packages
source .config
execute::command_line
Can anyone point me in the right direction? This is the content of my file /etc/apache2/mods-enabled/userdir.conf
:
<IfModule mod_userdir.c>
UserDir public_html
UserDir disabled root
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Require all granted
</Limit>
<LimitExcept GET POST OPTIONS>
Require all denied
</LimitExcept>
</Directory>
<Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>
</IfModule>
Thanks in advance!
source to share
Make sure Apache2 userdir
and modules are enabled suexec
. Run the following commands as needed
cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/userdir.conf
sudo ln -s ../mods-available/userdir.load
sudo ln -s ../mods-available/suexec.load
You will need to restart Apache to activate the configuration.
sudo apache2ctl graceful
source to share