Skip to content

Security hardening: disable expose_php, raise max_input_time, remove Indexes #1268

Description

@lucifer4330k

Security hardening for server defaults.

Findings

  • php.ini has expose_php = On. Best practice is Off.
  • php.ini has max_input_time = 60, which can abort large multipart/form-data uploads while PHP is still reading POST data. After raising upload limits to 5G, this should be increased.
  • Apache site config docker/config/api.conf sets Options Indexes for the document root, enabling directory listings (not needed for API).

Proposed changes

  • Set expose_php = Off in docker/config/php.ini.
  • Set max_input_time = 3600 (or -1) in docker/config/php.ini.
  • Change <Directory /var/www/openml> Options to remove Indexes.

Acceptance criteria

  • No directory listing anywhere under DocumentRoot.
  • expose_php disabled.
  • Large uploads do not time out during PHP input parsing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions