Server Settings

Server Settings

Moodle provides extensive server configuration options that control how the application interacts with the underlying server infrastructure. Proper server configuration is essential for performance, security, and reliability.

Session Handling

Configure session settings at Site administration > Server > Session handling:

  • Use database for session information: Stores sessions in the database (default). Reliable and works across load-balanced environments.
  • Session timeout: Duration of inactivity before a user is logged out (default 7200 seconds / 2 hours). Balance between security and user convenience.
  • Cookie prefix: Prefix for session cookies. Change if running multiple Moodle instances on the same domain.
  • Cookie path: The URL path for session cookies. Set to / or the Moodle subdirectory path.
  • Cookie domain: The domain for session cookies. Usually left blank for automatic detection.
  • Secure cookies only: Enable this when using HTTPS to prevent cookies from being sent over insecure connections.

HTTP Settings

Configure HTTP-related settings at Site administration > Server > HTTP:

  • Use slash arguments: Enable file.php/path/to/file style URLs. Required for proper file serving. Disable only if your web server does not support it.
  • Reverse proxy: Enable if Moodle is behind a reverse proxy (Nginx, HAProxy, AWS ALB). Configure the proxy header containing the real client IP.
  • Proxy host: If your server accesses the internet through an HTTP proxy, enter the proxy details here.

Performance Settings

Key performance-related settings under Site administration > Server > Performance:

  • Extra PHP memory limit: Memory limit for memory-intensive scripts like backups and reports (default 512M)
  • Maximum time limit: PHP execution time limit for intensive operations
  • Cron memory limit: Memory limit specifically for cron processes
  • CURL cache TTL: How long to cache external HTTP requests

Maintenance Mode

Put your site into maintenance mode during updates or maintenance at Site administration > Server > Maintenance mode:

  • Maintenance mode: Enable/disable. When enabled, only admins can log in.
  • Maintenance message: Custom HTML message displayed to users during maintenance.

CLI alternative for enabling/disabling maintenance mode:

php admin/cli/maintenance.php --enable --message="We are upgrading. Back in 30 minutes."
php admin/cli/maintenance.php --disable

System Paths

Configure system paths at Site administration > Server > System paths:

  • Path to du: Path to the disk usage command (e.g., /usr/bin/du). Used for calculating directory sizes.
  • Path to aspell: Path to the aspell spell checker (e.g., /usr/bin/aspell).
  • Path to dot: Path to the Graphviz dot utility for generating graph images.
  • Path to ghostscript: Path to Ghostscript for PDF annotation (e.g., /usr/bin/gs). Required for annotating PDF assignment submissions.
  • Path to Python: Path to Python 3 executable (e.g., /usr/bin/python3). Used by some plugins.

Cleanup Settings

Under Site administration > Server > Cleanup:

  • Delete incomplete users after: How long to keep users who started but did not complete registration
  • Delete not fully set up users after: Time before incomplete user accounts are purged
  • Grade history lifetime: How long to retain grade history records
  • Disable gradebook histories: Option to turn off grade history tracking entirely

Environment Information

View your server environment at Site administration > Server > Environment. This page checks PHP version, database version, installed PHP extensions, and other requirements against the needs of your Moodle version. Any issues are highlighted with recommended actions.

PHP Info

View the full PHP information page at Site administration > Server > PHP info. This displays the output of phpinfo(), showing loaded modules, configuration values, and server variables. Useful for debugging configuration issues.

¿Le ha resultado útil este artículo?

  • Site Administration Overview

    Site Administration Overview The Site administration panel is the central hub for managing all aspec...
  • Security Settings

    Security Settings Moodle provides a comprehensive set of security settings to protect your site from...
  • Backup Settings

    Backup Settings Moodle provides a built-in course backup system that creates compressed archives of ...
  • Caching

    Caching Moodle uses a sophisticated caching framework called MUC (Moodle Universal Cache) to improve...
  • Performance Tuning

    Performance Tuning Optimizing Moodle performance involves a combination of server-level configuratio...