Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'v installed Apache Tomcat and it's running. I have a php file which I want to run. Where do I have to put my php file so that going to http://localhost:8080/myPage.php (in my browser) will result in executing my php script?

EDIT: My OS is Windows 7

share|improve this question
up vote 2 down vote accepted

Right. I suspect you're quite confused here.

Apache Tomcat is a container for java applications. I think you should have installed Apache Web Server, and PHP. There's no sensible way to get Tomcat to handle PHP (without Resin, but that's a different story).

You'd probably be best to install XAMPP and use the server packages provided by that.

share|improve this answer
Thanks. If I install Apache Web Server (and PHP) will it coexist with my Apache Tomcat (which I also use)? – snakile Jan 3 '11 at 22:22
Yeah, should be fine. Tomcat generally "lives" on port 8080, and Apache Webserver "lives" on port 80. I frequently use both on the same server with no problem. You could just ditch Tomcat if you never intend to deploy java web applications. – Tom O'Connor Jan 3 '11 at 22:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.