AWS Certificate manager x OJS redirect rule

Afternoon, i’ve been having some redirect issues with ojs on aws … i created a load balancer and then assigned it to my instance. But when i run the query to load the site it keeps redirecting… ive tried the restful_urls = On and trust_x_forwarded_for = On to allow me to use the query below in my httpd.conf file however i keep getting an infinite loop. Is it possible to tell me where or how i can find the redirect queries within ojs? as it seems the application keeps overriding what we put in.

<VirtualHost :80>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .
https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

Below are a few curl queries i run to show you the process.

[ec2-user@ip-10-0-12-6 ~]$ curl -I
HTTP/1.1 301 Moved Permanently
Date: Tue, 26 Jun 2018 12:37:56 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Server: Apache/2.4.33 (Amazon) PHP/5.6.36

[ec2-user@ip-10-0-12-6 ~]$ curl -I
HTTP/2 302
date: Tue, 26 Jun 2018 12:38:19 GMT
content-type: text/html; charset=UTF-8
server: Apache/2.4.33 (Amazon) PHP/5.6.36
x-powered-by: PHP/5.6.36
set-cookie: OJSSID=4cb0l6fpmjgthpcne0em6lqsc1; path=/;

[ec2-user@ip-10-0-12-6 ~]$ curl -Iv

  • Rebuilt URL to:
  • Trying…
  • Connected to ( port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • ALPN, server accepted to use h2
  • SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • Server certificate:
  •   subject:
  •   start date: Jun 25 00:00:00 2018 GMT
  •   expire date: Jul 25 12:00:00 2019 GMT
  •   common name:
  •   issuer: CN=Amazon,OU=Server CA 1B,O=Amazon,C=US
  • Using HTTP2, server supports multi-use
  • Connection state changed (HTTP/2 confirmed)
  • Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  • Using Stream ID: 1 (easy handle 0x1aed2b0)

User-Agent: curl/7.53.1
Accept: /

  • Connection state changed (MAX_CONCURRENT_STREAMS updated)!
    < HTTP/2 302
    HTTP/2 302
    < date: Tue, 26 Jun 2018 12:38:55 GMT
    date: Tue, 26 Jun 2018 12:38:55 GMT
    < content-type: text/html; charset=UTF-8
    content-type: text/html; charset=UTF-8
    < location:
    < server: Apache/2.4.33 (Amazon) PHP/5.6.36
    server: Apache/2.4.33 (Amazon) PHP/5.6.36
    < x-powered-by: PHP/5.6.36
    x-powered-by: PHP/5.6.36
    < set-cookie: OJSSID=9j7bs3tg74ji4ma3237u3oh890; path=/;
    set-cookie: OJSSID=9j7bs3tg74ji4ma3237u3oh890; path=/;


Any help you can offer will be appreciated.

Minz - Developer