Maybe this question is silly but I really don’t know how to solve.
First, as other server, I want to define new server. So, in Eclipse, I go to: Windows>Preference>Server:
1) When I add new server, in list, no category for Apache HTTP server. Just has Apache Tomcat. So, I click into download additional server adapter–>still don’t have in list.
2) So, I search. I point to location I have installed. Good, Eclipse sees that is a HTTP Server. And Eclipse sees folder to put project into for me (because I use LAMP so that folder isn’t in Apache folder).
But here is my problem. When I want to run a new PHP Project. Right click, run on server. A new dialog appear take me to choose which server to run. And, in list of server, no HTTP Server, So, I don’t know how to choose Apache HTTP Server !!! (because Eclipse doesn’t see which server that I have defined, eclipse just find adapter first)
So, if I want to run this project, I must copy all and paste to Apache folder. Too handy !!!
Please help me.
Thanks 🙂
Apache’s HTTP server and Eclipse don’t communicate with each other. The servers under Windows -> Preference -> Server are Java servers like Tomcat and Glassfish.
What you need to do is define your web project in Eclipse, then define that same directory to the HTTP server in the httpd.conf file. Or, since you’re already set up, write an Ant script in Eclipse to copy the PHP files to your HTTP folder.
Edited to add: Here’s my Ant script to keep my Eclipse directory and my HTTP directory synchronized. I develop in Windows.