Guest User

Untitled

a guest
Mar 29th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use Dancer2;
  3.  
  4. get '/' => sub {
  5. return 'Hello World!';
  6. };
  7.  
  8. start;
  9.  
  10. #!/usr/bin/perl
  11.  
  12. start;
  13. $date = `date`;
  14. $reddit = `curl -L www.google.com`;
  15. print<<END;
  16. <html>
  17. <head>
  18. <h2>Hello</h2>
  19. </head>
  20. <title>
  21. $date
  22. </title>
  23. <body>
  24. $reddit
  25. </body>
  26. </html>
  27. END
  28.  
  29. server.modules = (
  30. "mod_access",
  31. "mod_alias",
  32. "mod_compress",
  33. "mod_redirect",
  34. # "mod_rewrite",
  35. )
  36.  
  37. server.document-root = "/var/www/test"
  38. server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
  39. server.errorlog = "/var/log/lighttpd/error.log"
  40. server.pid-file = "/var/run/lighttpd.pid"
  41. server.username = "www-data"
  42. server.groupname = "www-data"
  43. server.port = 80
  44. server.chroot = "/"
  45.  
  46. index-file.names = ( "index.pl", "index.php", "index.html", "index.lighttpd.html" )
  47. url.access-deny = ( "~", ".inc" )
  48. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  49. compress.cache-dir = "/var/cache/lighttpd/compress/"
  50. compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
  51.  
  52. # default listening port for IPv6 falls back to the IPv4 port
  53. include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
  54. include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  55. include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
Add Comment
Please, Sign In to add comment