You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
788 B

user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
load_module modules/ngx_http_perl_module.so;
events {
worker_connections 1024;
}
http {
perl_modules /usr/lib/perl5/vendor_perl;
include /etc/nginx/mime.types;
sendfile off;
server_tokens off;
server {
listen 80;
server_name _;
resolver 8.8.8.8;
location / {
perl 'sub {
my $r = shift;
$r->send_http_header("text/html");
$r->print("Hello from Perl embedded in nginx!\n");
return OK;
}';
}
location ~ \.pl$ {
# perl 'MyApp::handler'; # Assuming MyApp::handler is defined in a Perl module
}
}
}