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.
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.
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
Set up your virtual host with your single php script as the only file in the web root, then add a 404 error handler to point to that file.
e.g.
ErrorDocument 404 /script.php
C.