LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-10-2023, 05:10 PM   #1
master
Member
 
Registered: Oct 2003
Location: Birmingham/Eng/UK
Distribution: /Debian3.1/suse/Win7/8/10
Posts: 680

Rep: Reputation: 30
Ubuntu 16.04 web server not displaying jscript


Hi, I'm running VPS Ubuntu 16.0.4 Apache2

I'm trying to implement RevolverMaps in to one of my sites and failing The script in question is

<script type="text/javascript" src="//rf.revolvermaps.com/0/0/6.js?i=5lbwdo39433&amp;m=7&amp;c=e63100&amp;cr1=ffffff&amp;f=arial&amp;l=0&amp;bv=90&amp;lx=-420&amp;ly=420&amp;hi=20&amp;he=7&amp;hc=a8ddff&amp;rs=80" async="async"></script>

I note that RevolverMaps have many different types of buttons and such. I just want to know why this one wont work.

I can run this code on all my other sites no problem which tells me I have no issue with my browser. This is a server config issue within Ubuntu I'm sure of it.

Can someone point my nose in the right direction?

When I inspect console errors is:

Refused to load the script 'https://rf.revolvermaps.com/0/0/6.js?i=5h4pdyh9s50&amp;m=1c&c=ff00ff&cr1=9d8b63&f=comic_sans_ms&l=0&hi=100&he=10&hc=ffc000&cw=00fff6 &cb=baff00' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.


Regards
 
Old 06-12-2023, 08:42 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

That error message says something about this:

Content Security Policy directive: "script-src 'self'".'

It means there are rules about where Javascript can come from. And it only allows Javascript from "self" - meaning your server. So it's blocked.

It can either be a meta tag in the html, or set as a HTTP header by the web server.

Look for "Content-Security-Policy" in the html. And if not found, look at the inspector - network, the request and headers. The server can also set it with some config or .htaccess
 
Old 06-15-2023, 12:52 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
FYI, that version is very out of date ref https://en.wikipedia.org/wiki/Ubuntu#Releases.
You should look into upgrading ...
 
  


Reply

Tags
apache2, ubuntu 16.04, webserver



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
odbc (php output not displaying in web browser,but it displaying in terminal) manu@vssc Red Hat 1 06-29-2011 01:33 AM
Firefox 3.5 in Ubuntu 9.10 - web pages not always displaying dreamweaver547 Ubuntu 2 11-16-2009 04:12 PM
Displaying PDFs from Red Hat 8.0 Web Server ecroswell Linux - Software 0 03-25-2003 08:42 AM
Jscript error Risc91 Programming 0 01-31-2002 12:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration