Initial commit
This commit is contained in:
15
survey-nginx/perl/MyModule.pm
Normal file
15
survey-nginx/perl/MyModule.pm
Normal file
@@ -0,0 +1,15 @@
|
||||
package MyModule;
|
||||
|
||||
use nginx; # Make sure to use the nginx module
|
||||
|
||||
sub handler {
|
||||
my $r = shift; # Get the request object
|
||||
$r->send_http_header("text/html"); # Send HTTP headers
|
||||
|
||||
# Print a simple HTML page
|
||||
$r->print("<html><body><h1>Hello, Nginx Perl!</h1></body></html>");
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
1; # Ensure the module returns true
|
||||
Reference in New Issue
Block a user