I've installed Apache 2.2. Accepted defaults.
I've created a simple php file calling it index.php.
If I enter this in Firefox: http://localhost:8080/
I get the splash screen:
If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.
Gets me to the help screen.
I created a new projectd in NetBean 6.5.1. I pointed directory of the project to:
C:\Program Files\Apache Group\Apache2\htdocs\Apache
Project/Source Directories: C:\Program Files\Apache Group\Apache2\htdocs
Project URL: http://localhost:8080/htdocs/
I created a simple index.php file with echo("test")
The requested URL /htdocs/index.php was not found on this server. Apache/2.0.63 (Win32) Server at localhost Port 8080
The URL is just http://localhost:8080/index.php
You don't need the htdocs directory in there.
The "htdocs" directory is normally where your pages are served from, so I'd expect the URL to be http://localhost:8080/index.php rather than having /htdocs in the URL as well.
By default, your web root is "htdocs". Whenever you go to "http://localhost:8080", it looks for any paths/files you specify inside the htdocs directory, so you don't have to manually add it to your URL.
I would suggest uninstalling the current Apache install, and installing WAMP instead. It gives you Apache with PHP installed, and MySQL for more advanced web applications. It is also all contained within "C:\wamp", so all your binaries can be found in one place.
Sounds like your problem is just the url you were trying. Although, if you're looking for a simpler way, packages like XAMPP can make it really easy to set up a functioning server for development.