Page 1 of 1

Configurable Web Root

PostPosted: January 7th, 2013, 2:05 pm
by fantasticjamieburns
Hello,

Is there any way to specify the folder that is the web root when debugging?

In my Zend Framework 2 project (and most other frameworks) the site is accessed using:

Code: Select all
/public/index.php


I can specify that as the starting page and when debugging I am taken to:

Code: Select all
http://localhost/public/index.php


But what I really want is:

Code: Select all
http://localhost/index.php


So that my routes work correctly.

Jamie.

Re: Configurable Web Root

PostPosted: January 7th, 2013, 2:26 pm
by CFI
In the project properties you can define a start URL. Thats how I am using it, as my webroot is also not the root of the project.

Re: Configurable Web Root

PostPosted: January 7th, 2013, 3:05 pm
by Jakub Misek
Hi,

As CFI noted, you can easily setup start page.

However change the web root to some project subfolder is not possible yet.
(For now you can only configure your own webserver to point to a custom folder, and use "Custom Web Server" instead of built-in PHP 5.4 or IIS Express.)

We will note this feature, and plan this into some future update.

Thanks

Re: Configurable Web Root

PostPosted: January 7th, 2013, 3:22 pm
by CFI
IMHO this is not really important as I think you should also use the target webserver (and PHP version and so on) during development.
I for example use the odd configuration of LightTPD under windows because of this as my target device (webinterface of an embedded device) runs it.

I had serveral problems in the past when using different tools for development and deployment, so I only recommend the built in webserver for small stuff or testing.

Re: Configurable Web Root

PostPosted: January 8th, 2013, 2:51 pm
by fantasticjamieburns
CFI:
Thanks - it is useful for debugging.
When I hit F5 I expect the app to work, which it may not if anything relies on an absolute web root path. We can debate the usefulness of making everything relative but the debugger should not decide where the web root is really.

Jakub:
Thanks - I will configure the custom web server for this and it would be great if that was a setting in the projects page at some point.