|
|
3 weeks ago | |
|---|---|---|
| cgi-bin | 3 weeks ago | |
| www | 3 weeks ago | |
| README.md | 3 weeks ago | |
| productos.db | 3 weeks ago |
Install fcgiwrap
sudo pacman -S fcgiwrap
sudo vi /etc/nginx/fastcgi.conf
location ~ cgi$ {
gzip off;
allow all;
fastcgi_pass 127.0.0.1:9000;
include /etc/nginx/fastcgi_params;
fastcgi_param DOCUMENT_ROOT /cgi-bin;
fastcgi_param SCRIPT_NAME /cgi-bin/demo.cgi;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
sudo vi /etc/nginx/nginx.conf
server {
.....
.....
include fcgiwrap.conf;
}
Iniciar servicios
sudo systemctl enable fcgiwrap
sudo systemctl restart nginx
install perl Modules
perl -MCPAN -e shell
install CGI install DBI install DBD:SQLite
Testing
test.cgi
#!/usr/bin/env perl use strict; use warnings; use CGI qw(:standard);
print header(); print start_html('Variables de Entorno');
print h1('Variables de Entorno de CGI'); print "
print "<li><strong>$key:</strong> $ENV{$key}</li>\n";
} print "
\n";