OJS stylesheets and scripts not loading… OJS seems to be looking for HTTP instead of HTTPS

OJS stylesheets and scripts not loading… OJS seems to be looking for HTTP instead of HTTPS

Our new install of OJS 3.3.0.11 is not loading correctly from behind our enterprise firewall/load balancer. It seems this is related to OJS looking for HTTP items instead of HTTPS.

When we visit the website (https://journals.towson.edu/) we get a page without CSS or scripts. See below:

Screen Shot 2022-10-11 at 8.39.05 AM

This issue occurs when loading the site though our enterprise firewall/load balancer using the DNS name. The site loads fine when loaded from localhost on the server. When we visit the website (https://journals.towson.edu/) we get a page without CSS or scripts. It produces the following errors:

​Our firewall/load balancer is set to display HTTPS sites and I notice that OJS is calling HTTP resources.

About our set up:

We are running OJS 3.3.0.11 on a RHEL 8.6 system. It sits behind an F5 device that handles firewall, load balancing, and DNS. The following is our system information:

Current version: 3.3.0.11 (September 8, 2022 - 08:47 PM)

Check for updates

Version history

Version Major Minor Revision Build Date installed
3.3.0.11 3 3 0 11 2022-09-08

Server Information

Setting Name Setting Value
OS platform Linux
PHP version 7.4.19
Apache version Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k mod_wsgi/4.6.8 Python/3.8
Database driver mysql
Database server version 5.5.5-10.3.32-MariaDB

OJS Configuration

Setting Name Setting Value
general
installed 1
base_url https://journals.towson.edu
session_cookie_name OJSSID
session_lifetime 30
scheduled_tasks
time_zone UTC
date_format_short %Y-%m-%d
date_format_long %B %e, %Y
datetime_format_short %Y-%m-%d %I:%M %p
datetime_format_long %B %e, %Y - %I:%M %p
time_format %I:%M %p
disable_path_info
allow_url_fopen
restful_urls
allowed_hosts
trust_x_forwarded_for
citation_checking_max_processes 3
show_upgrade_warning 1
enable_minified 1
enable_beacon 1
sitewide_privacy_statement
database
driver mysqli
host localhost
username ojs_user
password **************
name ojs
debug
cache
object_cache none
memcache_hostname localhost
memcache_port 11211
web_cache
web_cache_hours 1
i18n
locale en_US
client_charset utf-8
connection_charset utf8
files
files_dir /var/www/files
public_files_dir public
public_user_dir_size 5000
umask 18
filename_revision_match 70
finfo
security
force_ssl
force_login_ssl
session_check_ip 1
encryption sha1
salt YouMustSetASecretKeyHere!!
api_key_secret
reset_seconds 7200
allowed_html a[href target title],em,strong,cite,code,ul,ol,li[class],dl,dt,dd,b,i,u,img[src alt],sup,sub,br,p
email
time_between_emails 3600
max_recipients 10
require_validation
validation_timeout 14
search
min_word_length 3
results_per_keyword 500
oai
oai 1
repository_id ojs2.localhost
oai_max_records 100
interface
items_per_page 25
page_links 10
captcha
recaptcha
recaptcha_public_key your_public_key
recaptcha_private_key your_private_key
captcha_on_register 1
recaptcha_enforce_hostname
cli
tar /bin/tar
xslt_command
proxy
debug
show_stacktrace
display_errors
deprecation_warnings
log_web_service_info
curl

Thank you in advance for your help!

Kindly check in httpd configuration with SSL.cnf file.

Thanks! A follow up, would I be checking this on my Linux system or is this something that would need to be set on our firewall appliance? I am new to OJS so any more detail you can offer is appreciated. Thanks!

Update:

I attempted to turn on side wide SLL in the config file:

[security]
; Force SSL connections site-wide
force_ssl = On

; Force SSL connections for login only
force_login_ssl = On

Now the site is unreachable because “too many redirects”. Reverting back to the Off values returns the to its pervious state. Thanks again for any help anybody might offer!

A follow up we are still struggling with this problem. We’ve done some further troubleshooting and here is what we know. This has something to do with our F5 firewall and SSL. We have OJS installed on a Linux server in our enterprise data center. The F5 provides DNS and the SSL cert; it’s proxy. The SSL cert is not installed on the server itself.

When we look at OJS behind the firewall it works properly and even gives itself a self-signed cert. When we contact the server from outside the firewall then we get no scrips or CSS when using SSL. Our firewall admin temporary enabled http (not https) and then the site loads but that’s not a solution as SSL is mandatory in our enterprise.

Here is the odd thing; the page being delivered to via HTTPS through the firewall is different than what we see when access the page behind the firewall.

All references to HTTPS have been replaced with HTTP. `A follow up we are still struggling with this problem. We’ve done some further troubleshooting and here is what we know. This has something to do with our F5 firewall and SSL. We have OJS installed on a Linux server in our enterprise data center. The F5 provides DNS and the SSL cert; it’s proxy. The SSL cert is not installed on the server itself.

When we look at OJS behind the firewall it works properly and even gives itself a self-signed cert. When we contact the server from outside the firewall then we get no scrips or CSS when using SSL. Our firewall admin temporary enabled http (not https) and then the site loads but that’s not a solution as SSL is mandatory in our enterprise.

Here is the odd thing; the page being delivered to via HTTPS through the firewall is different than what we see when access the page behind the firewall.

When we view the page behind the firewall this is our source:

				</title>
<div class="pkp_structure_page">

			<header class="pkp_structure_head" id="headerNavigationContainer" role="banner">
					 <nav class="cmp_skip_to_content" aria-label="Jump to content links">
<a href="#pkp_content_main">Skip to main content</a>
<a href="#siteNav">Skip to main navigation menu</a>
								<a href="#pkp_content_footer">Skip to site footer</a>
		<div class="pkp_head_wrapper">

			<div class="pkp_site_name_wrapper">
				<button class="pkp_site_nav_toggle">
					<span>Open Menu</span>
				</button>
										<h1 class="pkp_screen_reader">
														
												</h1>
									<div class="pkp_site_name">
															<a href="						https://ojsserv1.towson.edu/index.php/index/index
				" class="is_img">
						<img src="https://ojsserv1.towson.edu/templates/images/structure/logo.png" alt="Open Journal Systems" title="Open Journal Systems" width="180" height="90" />
					</a>
									</div>
			</div>

			
			<nav class="pkp_site_nav_menu" aria-label="Site Navigation">
				<a id="siteNav"></a>
				<div class="pkp_navigation_primary_row">
					<div class="pkp_navigation_primary_wrapper">
																		
			

																			</div>
				</div>
				<div class="pkp_navigation_user_wrapper" id="navigationUserWrapper">
						<ul id="navigationUser" class="pkp_navigation_user pkp_nav_list">
							<li class="profile">
			<a href="https://ojsserv1.towson.edu/index.php/index/user/register">
				Register
			</a>
						</li>
							<li class="profile">
			<a href="https://ojsserv1.towson.edu/index.php/index/login">
				Login
			</a>
						</li>
									</ul>

				</div>
			</nav>
		</div><!-- .pkp_head_wrapper -->
	</header><!-- .pkp_structure_head -->

					<div class="pkp_structure_content">
		<div class="pkp_structure_main" role="main">
			<a id="pkp_content_main"></a>
<div class="journals">
	<h2>
		Journals
	</h2>
				There are no journals available.
		</div>
</div><!-- pkp_structure_main -->

						</div><!-- pkp_structure_content -->
<div class="pkp_structure_footer">

	
	<div class="pkp_brand_footer" role="complementary">
		<a href="https://ojsserv1.towson.edu/index.php/index/about/aboutThisPublishingSystem">
			<img alt="More information about the publishing system, Platform and Workflow by OJS/PKP." src="https://ojsserv1.towson.edu/templates/images/ojs_brand.png">
		</a>
	</div>
</div>

When we view the page through the firewall this is our source:

				</title>
<div class="pkp_structure_page">

			<header class="pkp_structure_head" id="headerNavigationContainer" role="banner">
					 <nav class="cmp_skip_to_content" aria-label="Jump to content links">
<a href="#pkp_content_main">Skip to main content</a>
<a href="#siteNav">Skip to main navigation menu</a>
								<a href="#pkp_content_footer">Skip to site footer</a>
		<div class="pkp_head_wrapper">

			<div class="pkp_site_name_wrapper">
				<button class="pkp_site_nav_toggle">
					<span>Open Menu</span>
				</button>
										<h1 class="pkp_screen_reader">
														
												</h1>
									<div class="pkp_site_name">
															<a href="						http://journals.towson.edu/index.php/index/index
				" class="is_img">
						<img src="http://journals.towson.edu/templates/images/structure/logo.png" alt="Open Journal Systems" title="Open Journal Systems" width="180" height="90" />
					</a>
									</div>
			</div>

			
			<nav class="pkp_site_nav_menu" aria-label="Site Navigation">
				<a id="siteNav"></a>
				<div class="pkp_navigation_primary_row">
					<div class="pkp_navigation_primary_wrapper">
																		
			

																			</div>
				</div>
				<div class="pkp_navigation_user_wrapper" id="navigationUserWrapper">
						<ul id="navigationUser" class="pkp_navigation_user pkp_nav_list">
							<li class="profile">
			<a href="http://journals.towson.edu/index.php/index/user/register">
				Register
			</a>
						</li>
							<li class="profile">
			<a href="http://journals.towson.edu/index.php/index/login">
				Login
			</a>
						</li>
									</ul>

				</div>
			</nav>
		</div><!-- .pkp_head_wrapper -->
	</header><!-- .pkp_structure_head -->

					<div class="pkp_structure_content">
		<div class="pkp_structure_main" role="main">
			<a id="pkp_content_main"></a>
<div class="journals">
	<h2>
		Journals
	</h2>
				There are no journals available.
		</div>
</div><!-- pkp_structure_main -->

						</div><!-- pkp_structure_content -->
<div class="pkp_structure_footer">

	
	<div class="pkp_brand_footer" role="complementary">
		<a href="http://journals.towson.edu/index.php/index/about/aboutThisPublishingSystem">
			<img alt="More information about the publishing system, Platform and Workflow by OJS/PKP." src="http://journals.towson.edu/templates/images/ojs_brand.png">
		</a>
	</div>
</div>

The difference here is the presence of the firewall. When using SSL it’s all of the addresses suddenly start with HTTP instead of HTTPS.

Has anybody encountered this problem or something like it when using a firewall device? I know we have a very specific use case but any help would be apricated. Thanks
`

The difference here is the presence of the firewall. When using SSL it’s all of the addresses suddenly start with HTTP instead of HTTPS.

Has anybody encountered this problem or something like it when using a firewall device? I know we have a very specific use case but any help would be apricated. Thanks

Update: It turned out it was configuration error on our firewall device. The administrators of that device have made the needed changes. They did not share the technical details with me. Thank you everybody for your help. Thanks!

1 Like