Trader11
Banned
- Joined
- Oct 14, 2018
- Messages
- 15,698
- Reaction score
- 5,233
I found this site from Hackernews:
https://goalkicker.com/
https://goalkicker.com/
Bro can teach me how to build perl CGI app hosted in Apache Https?wow! There is perl even.![]()
I only know a bit.... scratch the surface only. So, cannot teach.Bro can teach me how to build perl CGI app hosted in Apache Https?![]()
Bro can teach me how to build perl CGI app hosted in Apache Https?![]()
use strict;
use warnings;
my $dt = localtime();
print "Content-Type: html\r\n\r\n";
print <<"ENDOFHTML";
<html>
<head>
<title>Welcome</title>
</head>
<body>
Helloworld at $dt
</body>
</html>
ENDOFHTML
# find where the cgi-bin directory is normally is /usr/lib/cgi-bin
find / -name cgi-bin
#In your Apache configuration at /etc/apache2/, there is normally the following directive
ScriptAlias "/cgi-bin/" "/usr/lib/cgi-bin/"
http://your.web.server/cgi-bin/yourscript.pl, it will be accessing/usr/bin/cgi-bin/yourscript.pl0750 and owned by the process userid running your apache, normally is www-datachown www-data:www-data /usr/lib/cgi-bin/yourscript.pl
chmod 0750 /usr/lib/cgi-bin/yourscript.pl
Laughing because I am happy.@Trader11 you are laughing because it is too simple for you ?
I really hope it is simple for you, because that is what is required of me to do when I'm a software developer in my first year working. It is an end-to-end knowledge from installing the Linux OS, installing the Apache HTTPd, to configure it, to coding in it, inclusive of webpage design to templatising into HTML/CSS/JS + server side scripting + database schema design with code and database optimisation.
I don't live in the IDE and I don't just survive above the IDE and browser as a software engineer.
![]()
Good for you. Anyone whom works in an Unix environment "MUST" know Perl, not just for web app.Laughing because I am happy.
Surprise surprise I am working on a project recently where I need to modify an old perl app.
I used Nginx initially....but realised it's so troublesome because of the need of extra module....Apache seems more supportive for cgiGood for you. Anyone whom works in an Unix environment "MUST" know Perl, not just for web app.
In any case, this is the most basic way of working with Perl CGI.
A more modern way, without resorting to framework yet is to use CGI module found at https://metacpan.org/pod/CGI
Personally when it come to certain sized perl application, I don't use frameworks because I don't find the need to.
When it comes to producing the HTML using a template engine,
in earlier days, I use HTML::Template
With the segregation of frontend and backend, you can always create RESTful Perl API to facilitate your vibrant frontend technologies
like React, Angular, Vue, Next etc.
![]()
I used Nginx initially....but realised it's so troublesome because of the need of extra module....Apache seems more supportive for cgi
Beautiful and excellent resources! Thank you so muchI found this site from Hackernews:
https://goalkicker.com/