poshttpd: PowerShell based scripting for the web

For a while now I’ve wanted to make use of PowerShell to do things like what you would use PHP for with Apache, but nothing I found worked, not even cgi-bin stuff. So I figured, why not just build my own? By using stuff like HttpListener, it’s pretty easy to get started and worry more about what the daemon will do with requests then how to handle the conversations.

Git logs and such can be found here and you can get the code by git cloning http://plan.snoj.us/repo/poshttpd.git

First commit comments

*Two “engines”.
**One passthru for static files like images and html.
**The second is for PowerShell scripts.

To build, you must first edit the rootDir variables in main.cs as well as the BG.prefix (if you desire), run buildntest.ps1. It will build main.cs and start poshttpd.exe.

After it’s built and running, open your brower (default: http://localhost:81) and run your PowerShell script. There is an example script in /sites/.

Leave a Reply

Your email address will not be published. Required fields are marked *