I am using Server version: Apache/2.4.10 (Raspbian) and Python 2.7.9
the issue I was getting that when trying to open my webpage
http://dhillon.duckdns.org:17581/cgi-bin/webgui.py
It was displaying the python code rather than the webpage.
I had to do below thing to get it fixed.
Make sure that the python files are under /usr/lib/cgi-bin/ and have correct permissions
Done !!!
the issue I was getting that when trying to open my webpage
http://dhillon.duckdns.org:17581/cgi-bin/webgui.py
It was displaying the python code rather than the webpage.
I had to do below thing to get it fixed.
sudo a2enmod cgithen modified the conf file under
sudo a2disconf serve-cgi-bin
/etc/apache2/apache2.confand included
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/after that restarted the apache and that's it .
<Directory "/usr/lib/cgi-bin/">
AddHandler cgi-script .py
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
sudo service apache2 reload
Make sure that the python files are under /usr/lib/cgi-bin/ and have correct permissions
Done !!!
No comments:
Post a Comment