ScriptAlias - 正确配置VirtualHost

时间:2018-03-20 09:37:28

标签: apache2 cgi virtualhost apache-modules

我遇到Apache(apache2)的问题 使cgi-scripts正常工作的配置

此配置运行正常:

<VirtualHost *:80>

    DocumentRoot /var/www/ejudge

        ScriptAlias "/cgi-bin/" /var/www/ejudge/cgi-bin/
        Alias /ejudge/ /var/www/ejudge/
        DirectoryIndex cgi-bin/new-register

        <Directory /var/www/ejudge/cgi-bin>
            Options +ExecCGI +FollowSymLinks +Includes
            AllowOverride None
            Require all granted
        </Directory>

</VirtualHost>

但我需要ScriptAlias/ejudge/cgi-bin/,因为我只需要在该路径上执行它们(例如http://example.com/ejudge/cgi-bin/,而不是http://exapmle.com/cgi-bin/

如果可能,请提供帮助

(如果文中有错误,请更正(我的英语有些问题))

0 个答案:

没有答案