how can I setup httpd.conf so that I can pipe all requests to that port go to a php file?

I am trying to make a socket connection from action script to localhost in flash.

Accepted Answer

You can use VirtualHosts...

To have a virtual host work specifically for that port, add the port number to the first line of the virtual host configuration. The first line should look something like the following:

<VirtualHost ip_address_of_your_server:12331>

You must also add

Listen 12331

to the httpd.conf

Now your server is listening to port 12331. In the VirtualHost configuration you can set the DirectoryIndex to route all default requests to a PHP file

<VirtualHost ip_address_of_your_server:12331>
DirectoryIndex myPhp.php
</VirtualHost>

In addition you could also use mod_rewrite and .htaccess files to route specific requests to the same PHP file as well.

I referred to: http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-apache-virtualhosts.html

Written by Srirangan
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki