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 veterinaryevidence.org
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
Location: https://veterinaryevidence.org
[ec2-user@ip-10-0-12-6 ~]$ curl -I https://veterinaryevidence.org
HTTP/2 302
date: Tue, 26 Jun 2018 12:38:19 GMT
content-type: text/html; charset=UTF-8
location: http://veterinaryevidence.org/ve
server: Apache/2.4.33 (Amazon) PHP/5.6.36
x-powered-by: PHP/5.6.36
set-cookie: OJSSID=4cb0l6fpmjgthpcne0em6lqsc1; path=/; domain=veterinaryevidence.org
[ec2-user@ip-10-0-12-6 ~]$ curl -Iv https://veterinaryevidence.org
- Rebuilt URL to: https://veterinaryevidence.org/
- Trying 54.77.100.22…
- TCP_NODELAY set
- Connected to veterinaryevidence.org (54.77.100.22) 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: CN=veterinaryevidence.org
-
start date: Jun 25 00:00:00 2018 GMT
-
expire date: Jul 25 12:00:00 2019 GMT
-
common name: veterinaryevidence.org
-
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)
HEAD / HTTP/2
Host: veterinaryevidence.org
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: http://veterinaryevidence.org/ve
location: http://veterinaryevidence.org/ve
< 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=/; domain=veterinaryevidence.org
set-cookie: OJSSID=9j7bs3tg74ji4ma3237u3oh890; path=/; domain=veterinaryevidence.org
<
- Connection #0 to host veterinaryevidence.org left intact
Any help you can offer will be appreciated.
Regards
Minz - Developer