If your webserver is going to support standard behaviour, then you have to split the POST options from the URL. So everything after the question mark becomes a list of key-value pairs separated by '&', like:
Code:
www.domain.com/my.php?a=1&b=2
You will get
www.domain.com/my.php as the base URL, your server has to figure out it's a PHP file, then split the key-value pairs into "a=1", "b=2", etc.
You will then call PHP (note the translation from web URL to local filesystem path) with a system call like
Code:
php /var/www/html/virtual.domain.com/my.php "a=1" "b=2"
or
Code:
php /var/www/html/virtual.domain.com/my.php "a" "1" "b" "2"
The examples above are simple but actually quite useless, because each PHP script would have to either split keys from values or assume keys and values follow each other in strict order.
A nice feature would be a PHP module in your server that sets up an $_REQUEST correctly, like
Code:
$_REQUEST['a'], $_REQUEST['b']
If you've done all that, you still only handled PHP. Do the same for Perl, Python, or whatever script you want to support.
The basic concept of a webserver is not complicated, but the implementation certainly will be. Is there a specific reason why you are not using Apache, Lighttpd or Tux?
Linux Archive