# Running RUM over HTTPS

**URL:** <https://discuss.elastic.co/t/running-rum-over-https/268035>\
**Category:** APM\
**Tags:** ruby, rum\
**Created:** [March 23, 2021, 3:46am UTC](https://discuss.elastic.co/t/running-rum-over-https/268035 "2021-03-23T03:46:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![macaulaysouza](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@macaulaysouza](https://discuss.elastic.co/u/macaulaysouza)\
**Post date:** [March 23, 2021, 3:46am UTC](https://discuss.elastic.co/t/running-rum-over-https/268035/1 "2021-03-23T03:46:06Z")

</div>

I'm configuring a new APM server and I already have a Ruby Agent running on my backend. Now I'm trying to setup a frontend monitor and I came across with RUM JS.

All my application runs over HTTPS so becuase of that, I'm forced to setup the RUM agent over HTTPS to avoid mixed content.

That is how i'm initializing it

```auto
//= require elastic-apm-rum.umd.min

elasticApm.init({
  serviceName: 'circle_prod',
  serverUrl: 'https://192.168.1.21:8200',
  serviceVersion: '',
  logLevel: 'debug',
})

```

And for sake of test, I also created locally the following files.

```auto
app/assets/javascripts/elastic-apm-rum.umd.js  
app/assets/javascripts/elastic-apm-rum.umd.min.js 
app/assets/javascripts/elastic-apm-rum.umd.min.js.map

```

But when I load my application I'm getting errors to POST it to Elastic-APM server

```auto
DevTools failed to load SourceMap: Could not load content for https://MYURL.com/assets/elastic-apm-rum.umd.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
application_v3-7775e63f66f978e7691e2e07cd29c35e.js:22240 [Elastic APM] Failed sending events! Error: https://192.168.1.21:8200/intake/v2/rum/events HTTP status: 0
    at t.e._constructError (application_v3-7775e63f66f978e7691e2e07cd29c35e.js:22240)
    at application_v3-7775e63f66f978e7691e2e07cd29c35e.js:22240
POST https://192.168.1.21:8200/intake/v2/rum/events net::ERR_ADDRESS_UNREACHABLE

```

Any idea if I'm skipping any steps?

I also have CORS on my nginx server and I get a 200 response testing it through my app server

```auto
curl -H "Origin: http://localhost" -H "Access-Control-Request-Method: POST" -H "Access-Control-Request-Headers: X-Requested-With" -X OPTIONS --verbose http://192.168.1.21:8200/intake/v2/rum/events
* Trying 192.168.1.21...
* TCP_NODELAY set
* Connected to 192.168.1.21 (192.168.1.21) port 8200 (#0)
> OPTIONS /intake/v2/rum/events HTTP/1.1
> Host: 192.168.1.21:8200
> User-Agent: curl/7.52.1
> Accept: */*
> Origin: http://localhost
> Access-Control-Request-Method: POST
> Access-Control-Request-Headers: X-Requested-With
> 
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers: Content-Type, Content-Encoding, Accept
< Access-Control-Allow-Methods: POST, OPTIONS
< Access-Control-Allow-Origin: http://localhost
< Access-Control-Expose-Headers: Etag
< Access-Control-Max-Age: 3600
< Content-Length: 0
< Vary: Origin
< X-Content-Type-Options: nosniff
< Date: Tue, 23 Mar 2021 03:18:13 GMT
< 

```

---

<div class="post-metadata">

**Author:** ![macaulaysouza](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@macaulaysouza](https://discuss.elastic.co/u/macaulaysouza)\
**Post date:** [March 30, 2021, 11:24pm UTC](https://discuss.elastic.co/t/running-rum-over-https/268035/2 "2021-03-30T23:24:21Z")

</div>

The problem was fixed using a Nginx proxy terminating the SSL and sending it over HTTP using the local network

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 20, 2021, 7:24pm UTC](https://discuss.elastic.co/t/running-rum-over-https/268035/3 "2021-04-20T19:24:56Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
