I installed apache2 into my bullseye version. I am immediately able to see the default index.html using a browser and entering the url of the Raspberry Pi.
But when I try to verify whether or not Apache handles perl files I run into trouble.
I first try to rename index.html file to index.pl (acceptable from /etc/apache2/mods-available.dir.conf)
The browser now shows the code of the file but not the web page. This is expected because it is not a perl file.
As a sidenote: if I rename it to something else, such as index.hello and run the browser the files in /var/www/html appear as if index.hello is not acceptable.
I next make the necessary modification to make index.pl render into an html file (as I do in all my web sites). Specifically by adding the following lines to the top:
#!/usr/bin/perl -w
print "content-type: text/html\n\n";
print <<BOD;
and the following line to the bottom:
BOD
Again running the browser with the url of the bullseye unit displays only the code and not the web page.
I think the problem might be the perl which comes with bullseye. I do not have this problem with my stretch units. To this possible end I tried reinstalling perl and even apache2.
When I change the mods-available/mime.conf line from AddHandler type-map var to AddHandler cgi-script .cgi .pl The browser does not let me see even the code. It says I do not have permission.
I have Googled this problem and tried the several possible solutions - to no avail. Problem still prevails.
Has anyone else experienced this problem. Because right now I cannot use the included apache2 in bullseye. I am, however, able to browse into any of my bullseye units and see their web pages which are all written in perl and js.
Any help would be greatly appreciated. Thx in advance.
But when I try to verify whether or not Apache handles perl files I run into trouble.
I first try to rename index.html file to index.pl (acceptable from /etc/apache2/mods-available.dir.conf)
The browser now shows the code of the file but not the web page. This is expected because it is not a perl file.
As a sidenote: if I rename it to something else, such as index.hello and run the browser the files in /var/www/html appear as if index.hello is not acceptable.
I next make the necessary modification to make index.pl render into an html file (as I do in all my web sites). Specifically by adding the following lines to the top:
#!/usr/bin/perl -w
print "content-type: text/html\n\n";
print <<BOD;
and the following line to the bottom:
BOD
Again running the browser with the url of the bullseye unit displays only the code and not the web page.
I think the problem might be the perl which comes with bullseye. I do not have this problem with my stretch units. To this possible end I tried reinstalling perl and even apache2.
When I change the mods-available/mime.conf line from AddHandler type-map var to AddHandler cgi-script .cgi .pl The browser does not let me see even the code. It says I do not have permission.
I have Googled this problem and tried the several possible solutions - to no avail. Problem still prevails.
Has anyone else experienced this problem. Because right now I cannot use the included apache2 in bullseye. I am, however, able to browse into any of my bullseye units and see their web pages which are all written in perl and js.
Any help would be greatly appreciated. Thx in advance.
Statistics: Posted by akaodin — Wed Apr 09, 2025 5:31 pm