locked
The <fastCgi> element configuration levels RRS feed

  • Question

  • User-72342010 posted

    The documentation states:


    You can configure the <fastCgi> element at the server level in the ApplicationHost.config file or at the site level, at the application level, or at the directory level in a Web.config file.


    Is it possible to configure the FastCGI application inside the web.config file after changing the allowDefinition attribute of the fastCgi section from AppHostOnly to Everywhere and unlocking the fastCgi section?

    Thursday, March 4, 2021 3:16 AM

All replies

  • User1771714573 posted

    Hi skvoboo,

    Yes, you can do this.

    You can unlock this restriction in IIS Manager to make FastCGI can be set in web.config.

    In the connections tree(in IIS), go to your server node and then to your website.

    1. For the website, in the right window you will see configuration editor under Management.
    2. Double click on the configuration editor.
    3. In the window that opens, on top you will find a drop down for sections. Choose "system.webServer/handlers" from the drop down.
    4. On the right side, there is another drop down. Choose "ApplicationHost.Config "
    5. On the right most pane, you will find "Unlock Section" under "Section" heading. Click on that.

    Then you can add any handler at level of site.

    Best regards,

    Brucz

    Thursday, March 4, 2021 6:55 AM
  • User-72342010 posted

    Brucz

    Then you can add any handler at level of site.

    The handlers section was unlocked earlier. I can add a handler on site level in the web.config file without problems.

    My question about ability to configure system.webServer/fastCgi/application element in the web.config file.

    Thursday, March 4, 2021 7:10 AM
  • User1771714573 posted

    Hi skvoboo,

    I did a test to configure fastcgi section in web.config, the fact is it failed. So it only can be configured on applicationhost.config.

    The issue has been proved in another thread.

    Best regards,

    Brucz

    Friday, March 5, 2021 3:50 AM
  • User-72342010 posted

    So it only can be configured on applicationhost.config.

    Related question.

    Is it possible to configure the FastCGI application at the site level inside the applicationHost.config file after changing the allowDefinition attribute of the fastCgi section from AppHostOnly to MachineToApplication and unlocking the <fastCgi> and <handlers> sections?

    Site location in the applicationHost.config file:

    <location path="Default Web Site">
        <system.webServer>
            <fastCgi>
                <application fullPath="C:\php\php-cgi.exe" arguments="-d name=value" />
            </fastCgi>
        </system.webServer>
    </location>

    Handler in the site web.config file:

    <configuration>
        <system.webServer>
            <handlers>
                <add name="FastCGI-PHP" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\php\php-cgi.exe|-d name=value" resourceType="File" />
            </handlers>
        </system.webServer>
    </configuration>
    Friday, March 5, 2021 4:39 AM
  • User1065476709 posted

    Hi skvoboo,

    Is it possible to configure the FastCGI application at the site level inside the applicationHost.config file after changing the allowDefinition attribute of the fastCgi section from AppHostOnly to MachineToApplication and unlocking the <fastCgi> and <handlers> sections?

    This is impossible, as far as i know, you can only configure FastCGI in applicationhost.config.

    Best regards,

    Sam

    Thursday, March 25, 2021 8:28 AM
  • User-72342010 posted

    as far as i know, you can only configure FastCGI in applicationhost.config.

    Hi samwu,

    I am asking about the ability to configure FastCGI settings in the applicationHost.config file, but at the site level.

    Is it possible or not?

    Thursday, March 25, 2021 8:49 AM
  • User1065476709 posted

    Hi skvoboo,

    I am asking about the ability to configure FastCGI settings in the applicationHost.config file, but at the site level.

    Is it possible or not?

    This is impossible.

    Best regards,

    Sam

    Thursday, March 25, 2021 9:18 AM
  • User-72342010 posted

    Thank you all for your participation.

    Last question.

    Is this an issue in the FastCGI Module or in the documentation?

    Thursday, March 25, 2021 9:24 AM
  • User1065476709 posted

    Hi skvoboo,

    Is this an issue in the FastCGI Module or in the documentation?

    What do you mean? can you explain it?

    Best regards,

    Sam

    Thursday, March 25, 2021 9:40 AM
  • User-72342010 posted

    samwu

    What do you mean? can you explain it?

    The documentation states:


    You can configure the <fastCgi> element at the server level in the ApplicationHost.config file or at the site level, at the application level, or at the directory level in a Web.config file.


    At the server level - OK

    At the site level, at the application level, or at the directory level - FAILED

    Thursday, March 25, 2021 9:45 AM