In Place Deployment Help

I need help setting up Deployment web paths on my local machine.
My setup looks like this. I have a local working copy of a project from a remote Git repositoty and Vagrant running on my local machine. Im using PHPStorm 7.0. What i'm trying to do is when I click on the "Open in Browser" menu item, I want the file i'm in to open up a url on my browser that works with the Vagrant setup.
So i did some research and found out that "Deployment" can do this for me by using "In Place" connection type. For my application to work, it needs to run through a controller.php file.

My Deployment settings looks like this:
Connectin Type: In Place
Web server root url: http://applayer.localhost:8080/shared/app as this is the url to my Vagrant.
Then in the mapping tab, I'm mapping a couple of directories to Web paths. They go as follows

Local Path: D:\Repositories\applayer_master\p1\app\API_01
Web Path: /controller.php?format=json&product=p1&function_name=API_01&param1=blah

Local Path: D:\Repositories\applayer_master\p2\app\API_02
Web Path: /controller.php?format=json&product=p2&function_name=API_02&param1=blah

The thing is, this almost works as expected except that when I click Open in Browser except that it adds /index.php to the end of the Web Path automatically.
For example: http://applayer.localhost:8080/shared/app/controller.php?format=json&product=p1&function_name=API_01&param1=blah/index.php
Is there a way to prevent that from happening? Or is there a better/another way to achieve what I need to do?

Thanks for taking your time to help me out,

Comment actions Permalink


Anyone have any idea on how to do this? Or maybe a better way of doing it if the way i've been trying is not the way to go?

Comment actions Permalink

Hi there,

I'm very positive that the way how you're trying to use Deployment functionality is completely wrong -- it was not designed to handle such idea/approach at all.

"Open in Browser" uses default (for current project) deployment entry to obtain the prefix (domain name and beginning part of the path, if available) when making final URL. Nothing more AFAIK. For example, "Open in Browser" cannot handle situation when web root folder is not a project root but just a subfolder (very common and widely used approach) --

If you need to repetitively open the same URL .. then either bookmark it in browser .. or create Run Configuration of most appropriate type (Run | Edit Configurations...)

Comment actions Permalink

Thanks for the reply Andriy.
I'll look into the Run configurations.


Please sign in to leave a comment.