Reputation: 1
I’m trying to mount a PHP service on windows azure. I want to create a virtual directory and I need to keep the original parent folder structure. However, Azure takes the vitual directory as root folder. This configuration works withou any problem in IIS 7 and windows azure SDK.
For example. When accessing the address www.myService.cloudapp.net the ‘MyFolder/lib/admin’ must be accessed, but it must keep all parent folders structure and files, which will be used by PHP
I tried to do this using the ServiceDefinition.csdef file:
Case1
<Sites>
<Site name="Web" physicalDirectory="./MyFolder/lib/admin/">
<Bindings>
<Binding name="Endpoint1" endpointName="HttpEndpoint" />
</Bindings>
</Site>
</Sites>
Case2
<Sites>
<Site name="Web" physicalDirectory="./MyFolder/lib/admin/">
<VirtualDirectory name="admin" physicalDirectory="MyFolder/lib/admin"/>
<Bindings>
<Binding name="Endpoint1" endpointName="HttpEndpoint" />
</Bindings>
</Site>
</Sites>
Case3
<Sites>
<Site name="Web" physicalDirectory="./MyFolder/lib/admin/">
<VirtualApplication name="admin" physicalDirectory="MyFolder/lib/admin">
<Bindings>
<Binding name="Endpoint1" endpointName="HttpEndpoint" />
</Bindings>
</Site>
</Sites>
In these cases azure makes the structure ‘E:\siterrot\0\admin’ and the parent folder of ‘admin’ is ‘0’ not ‘lib’ and PHP need acces to lib content.
Does azure support virtual directories?
Upvotes: 0
Views: 770
Reputation: 456
The easiest way is going into your azure portal for your website and go to configure your application. Scroll all the way down to find "Virtual applications and directories" for this specific purposes.
Upvotes: 0
Reputation: 1611
Yes, you should be able to by doing something like:
<WebRole name="SampleWebApp">
<Sites>
<Site name="SampleSite" physicalDirectory="..\SampleWebApp">
...
<VirtualDirectory name="Scripts"
physicalDirectory="..\SampleWebApp\Scripts" />
<VirtualDirectory name="Styles"
physicalDirectory="..\SampleWebApp\Styles" />
</VirtualApplication>
...
</Site>
</Sites>
...
</WebRole>
This is from:
http://msdn.microsoft.com/en-us/library/windowsazure/gg432956.aspx
Upvotes: 0