Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual directory path and static files #462

Open
alvarotrigo opened this issue Nov 20, 2015 · 2 comments
Open

Virtual directory path and static files #462

alvarotrigo opened this issue Nov 20, 2015 · 2 comments

Comments

@alvarotrigo
Copy link

I've tried to follow your recommendations in this answer but I was not able to server static files correctly.
I also took a look at the example in one of your posts and even at this gists which is more complete.

This is my current web.config file:

<configuration>
    <appSettings>
        <add key="virtualDirPath" value="/haulierportal" />
    </appSettings>
  <system.webServer>

    <handlers>
      <add name="iisnode" path="bin/www" verb="*" modules="iisnode" />
    </handlers>

    <rewrite>
      <rules>
        <rule name="StaticContent">
           <action type="Rewrite" url="public{REQUEST_URI}"/>
        </rule>

        <rule name="DynamicContent">  
            <conditions> 
                <add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>  
            </conditions>  
            <match url="/*" />
            <action type="Rewrite" url="bin/www" />
         </rule> 
      </rules>
    </rewrite>

 <iisnode      
      node_env="localhost"
      nodeProcessCountPerApplication="1"
      maxConcurrentRequestsPerProcess="1024"
      maxNamedPipeConnectionRetry="100"
      namedPipeConnectionRetryDelay="250"      
      maxNamedPipeConnectionPoolSize="512"
      maxNamedPipePooledConnectionAge="30000"
      asyncCompletionThreadCount="0"
      initialRequestBufferSize="4096"
      maxRequestBufferSize="65536"
      watchedFiles="*.js;iisnode.yml"
      uncFileChangesPollingInterval="5000"      
      gracefulShutdownTimeout="60000"
      loggingEnabled="true"
      logDirectory="iisnode"
      debuggingEnabled="true"
      debugHeaderEnabled="false"
      debuggerPortRange="5058-6058"
      debuggerPathSegment="debug"
      maxLogFileSizeInKB="128"
      maxTotalLogFileSizeInKB="1024"
      maxLogFiles="20"
      devErrorsEnabled="false"
      flushResponse="false"      
      enableXFF="false"
      promoteServerVars=""
      configOverrides="iisnode.yml"
     />

  </system.webServer>
</configuration>
@aeciolevy
Copy link

@alvarotrigo Can you post you express server as well?

I could not load the server with this web.config setup.

@jdnichollsc
Copy link

I think you can generate the server using express generator cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants