[Web Interface] Can't find config.js to correct typo


(M Casqueira) #1

Hey, I just got Graylog setup on a Debian 9 box. I did the manual install following the docs here. I have the box setup to use NGINX for reverse proxy to Graylog web interface AND api endpoint both running on port 9000. Everything is running perfectly fine except when I first visited the site I had a typo in my server_name that was forwarded to Graylog. Because of this the interface fails to reach /api/ endpoint. The issue is because the config.js file that contains window.appConfig.gl2ServerUrl value has the url with the typo. I can’t find anywhere on the server for this file and can’t find any resources online to reset this file. For me to get into the dashboard I have to open console and actually set the correct value for gl2ServerUrl with window.appConfig.gl2ServerUrl = ‘https://domain.com/api/’ before the site starts to load. After then I have successfully logged in and played around with the interface but if I refresh the page I’ll have to do it again.

Hopefully I don’t have to do a complete reinstall :confounded:


(Jochen) #2

The content of the /config.js HTTP resource is automatically generated by Graylog depending on its configuration.

The serverUri setting is generated from rest_transport_uri, web_endpoint_uri, or the X-Graylog-Server-URL HTTP request header.



(M Casqueira) #3

Thanks for clarifying that. I absolutely made sure in my server.conf that the rest_transport_uri and web_endpoint_uri were properly set. I even searched for the typo with 0 results to ensure I didn’t have it anywhere. I did the same for my nginx server block config. I would restart graylog and nginx and even the box to ensure the system was updating with my changes which it wasn’t and led me to make this post.

This morning though I modified the proxy_set_header value for X-Graylog-Server-URL to be static instead of reference $server_name value and it worked. I put back $server_name to see if it would break but it still worked too…so not even sure what the issue was but it’s resolved now. :roll_eyes:

edit: I realized now since I’m running this box behind cloudflare to handle my SSL, cloudflare was caching the config.js file that had the incorrect value. So after I fixed the value and restarted the services, the right config.js was being generated but cloudflare was sending the cached version. (I did clear my browser cache as well when trying to debug)


(system) #4

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