Next step: %IGStepNextText%
Up: Configure the web server

Installing Foswiki: Disable software from running in the pub directory

If you are using a config file

The ApacheConfigGenerator generates the following directives for the pub directory in order to disable software from running:
<Directory "/var/www/foswiki/pub">
    ...
    # Disable execution of PHP scripts
    php_admin_flag engine off

    # This line will redefine the mime type for the most common types of scripts
    AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi

If there are any additional extensions that your web server installation recognizes as executable types, then add them to the AddType directive in order to disable them.

If you are using a .htconfig file

The sample pub-htaccess.txt file in the root directory of the installation contains the following directives:
# If you have PHP4 or PHP5 installed as Apache module make sure the directive below is enabled
# If you do not have PHP installed you will need to comment out the directory below
# to avoid errors.
# If PHP is installed as CGI this flag is not needed and will in fact make Apache fail 
php_flag engine off

# If you have PHP3 installed as Apache module make sure the directive below is enabled
# If PHP is installed as CGI this flag is not needed and will in fact make Apache fail
#php3_engine off

# This line will redefine the mime type for the most common types of scripts
AddType text/plain .shtml .php .php3 .phtml .phtm .pl .py .cgi

If you are using PHP4 or PHP5, then leave the default setting in place. If you are using PHP3, then follow the directions to comment out the php_flag engine off directive and uncomment the php3_engine off directive.

If there are any additional extensions that your web server installation recognizes as executable types, then add them to the AddType directive in order to disable them.

Next step: %IGStepNextText%
Up: Configure the web server

  • Set IGVariant =

Customized versions of InstallStepProtectPub:

Topic revision: r1 - 24 Jan 2010, IsaacLin
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy