Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Whats the best way to deploy a PHP (PDT) Eclipse Project to Apache? (on Ubuntu)

What's the best way to deploy a PHP PDT Eclipse Project on Apache 2.2 on Ubuntu?

I already tried to find an Apache Eclipse server adapter but got no luck. Do you know any?

If not, what's the best way to deploy a PHP Project to Apache? Shell script? Ant script? Other solution?

I could put the project folder inside the Apache's www folder but I would prefer to have the project files on a cloned git repository outside of Apache.

I'm using Eclipse Helios SR1, PDT 2.2.1 and Apache 2.2.16.

Thanks in advance.

like image 866
pedrosanta Avatar asked Nov 04 '10 14:11

pedrosanta


1 Answers

I came across this page looking for a Windows solution and found this little workaround in the meantime that might prove useful to someone:

  1. Select Run > External tools > External tools configuration
  2. Add a new configuration, name it Deploy or something
  3. Set the location field to C:\Windows\System32\xcopy.exe
  4. Set the argument field to ${workspace_loc}${project_path}\*.php c:\inetpub\wwwroot\${project_name} /s /y
  5. Create the directory c:\inetpub\wwwroot\${project_name} manually so xcopy doesn't get confused

This will copy all your PHP files over to your webserver content directory in a subfolder with the same name as your project. The nice part is that you can run this deployment shortcut from the Run Tool button, right next to your Debug and Run buttons.

like image 107
Rim Avatar answered Nov 10 '22 21:11

Rim