Images from wwwroot are not displayed (despite display)

In my ColdFusion application, I want to save images outside wwwroot in this folder: C: \ extSite \ stdImages

I created the mapping in wwwroot \ WEB-INF \ jrun-web.xml as follows:

<virtual-mapping>
    <resource-path>/extStdImages</resource-path>
    <system-path>C:\extSite\stdImages\</system-path>
</virtual-mapping>

To display the image, I do this:

<img src="/extStdImages/abc.jpg">

This works fine on my dev site (which uses the built-in ColdFusion web server), but the image does not appear in the workplace (where I use IIS). I am wondering if I need to change anything in IIS or elsewhere on the production server in order to allow access to these files.

Can anyone help? Thanks in advance!

Peter

+1
source share
3 answers

iis , . wwwroot , , -. - .

+4

IIS, web.config

http://www.iis.net/configreference/system.applicationhost/sites/site/application/virtualdirectory

:

<site name="Contoso" id="2" serverAutoStart="true">
   <application path="/">
      <virtualDirectory path="/" physicalPath="C:\Contoso\Content" />
   </application>
   <application path="/CRM">
      <virtualDirectory path="/" physicalPath="C:\Contoso\Content\CRM" />
      <virtualDirectory path="/Images" physicalPath="E:\Images" />
   </application>
   <bindings>
      <binding protocol="http" bindingInformation="*:80:www.contoso.com" />
   </bindings>
</site>
+2

. C:\extSite\stdImages \ , CF C:/extSite/stdImages/

0

Source: https://habr.com/ru/post/1684366/


All Articles