Running PHP file outside of documentroot (cgi-bin folder)

后端 未结 5 1368
慢半拍i
慢半拍i 2021-01-25 13:22

I am working with a colleague to set up their local environment on a MAC in XAMPP, on windows my vhost looks like the one below.

When I access a URL like http://domain.l

5条回答
  •  再見小時候
    2021-01-25 14:07

    I think you need a section for your cgi-bin.

    The fact that your server can show you the script sources means the server has at least read permissions on /file/system/path/to/cgi-bin and IIRC that clashes with ScriptAlias b/c ScriptAlias expects /file/system/path/to/cgi-bin to be unaccessible for security reasons. I think your solution should look something along the lines of:

    
        Options ExecCGI
        SetHandler cgi-script
    

提交回复
热议问题