I am running apache2 as a web server. I have a local file, example.php, which I need to see as rendered by apache. The easiest way to do this would be to move or link the file to the folder apache exposes as part of my site, and then I could get the page with curl or wget.
However, this is not possible in my situation - I cannot write to the directory apache is looking in, which means that I can't access it by the usual port 80 method. Is there a way I can call apache directly, giving it a php file to generate the result of?
I'm looking for a command like $ apache ./example.php > output.html
, is this possible?
I'm asking about apache, because although I only really need it to run the php, the php-cli is not usable in this cases - apache php and cli php have access to different areas of memory, and I need the results to match the ones returned through apache.
http://localhost/
shows the contents of/var/www
, but my file is in/home/name/stuff
, there's no way to get to it. Unless there is, in which case tell me please! – Benubird Apr 18 '13 at 16:09