Can't send data to RUM Endpoint despite having it enabled

Hello!

I'm using Elasticsearch, APM, and Kibana 8.15.0. Everything is self-hosted inside a VM. I can send logs, metrics, etc from Elastic Java APM Agent just fine. They're all indexed in ES.

However, I can't seem to send RUM events to APM. I have everything enabled in the apm-server.yml.

  # Enable Real User Monitoring (RUM) Support. By default RUM is disabled.
  # RUM does not support token based authorization. Enabled RUM endpoints will not require any authorization
  # token configured for other endpoints.
  rum:
    enabled: false

    #-- General RUM settings

    # A list of permitted origins for real user monitoring.
    # User-agents will send an origin header that will be validated against this list.
    # Allowed origins in this setting can have * to match anything (eg.: http://*.example.com)
    # If an item in the list is a single '*', everything will be allowed.
    allow_origins: ['*']

    # A list of Access-Control-Allow-Headers to allow RUM requests, in addition to "Content-Type",
    # "Content-Encoding", and "Accept"
    allow_headers: []

Even after restarting the APM Server (using systemctl restart), the endpoint is still closed. The /intake/v2/rum/events returns the following message:

{
  "error": "forbidden request: RUM endpoint is disabled. Configure the `apm-server.rum` section in apm-server.yml to enable ingestion of RUM events. If you are not using the RUM agent, you can safely ignore this error."
}

I checked the APM server log and found this:

{"log.level":"error","@timestamp":"2024-09-06T05:10:45.518-0400","log.logger":"request","log.origin":{"function":"github.com/elastic/apm-server/internal/beater/api.apmMiddleware.LogMiddleware.func1.1","file.name":"middleware/log_middleware.go","file.line":59},"message":"forbidden request","service.name":"apm-server","url.original":"/intake/v2/rum/events","http.request.method":"GET","user_agent.original":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36","source.address":"[my IP redacted]","http.request.id":"046ccfd5-fcb1-40be-83a2-5b94332bc476","event.duration":220334,"http.request.body.bytes":0,"http.response.status_code":403,"error.message":"forbidden request: RUM endpoint is disabled. Configure the `apm-server.rum` section in apm-server.yml to enable ingestion of RU events. If you are not using the RUM agent, you can safely ignore this error.","ecs.version":"1.6.0"}

Thank you.