Web services on subdomains


#1

We have a VPS connected to our domain, through Cloudflare. The VPS has a number of different web services running on it (in Docker containers), using different protocols (HTTP and HTTPS), using different ports.

Port 443 = Main server (codedragon.org) - this works
Port 8082 = Moodle - this doesn’t

We would like a user entering moodle.codedragon.org to see what is currently at IP:8082 (which we’re not publishing here for security reasons, but does work), and we have tried to do this with the following A record:
(IP blacked out)

and SRV records below (due to new user post restrictions)


#2

POrt 8082 is not supported. Please use one of the following:

HTTPS:
443
2053
2083
2087
2096
8443

HTTP
80
8080
8880
2052
2082
2086
2095

Reference:


#4

Thank you. We have now changed the ports for Moodle to 2052 for HTTP and 2053 for HTTPS, and it works accessing the IP directly, but are still experiencing some issues on the domain. We think that the issues might now be coming from SSL?

curl -I https://moodle.codedragon.org gives (with SSL flexible)

HTTP/2 301 
date: Wed, 19 Sep 2018 14:09:14 GMT
set-cookie: __cfduid=dc6684c34138f1ee265973725392808dc1537366154; expires=Thu, 19-Sep-19 14:09:14 GMT; path=/; domain=.codedragon.org; HttpOnly; Secure
location: https://moodle.codedragon.org/
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 45cca1000a72bc2c-LHR

curl -I https://moodle.codedragon.org gives (with SSL full)

HTTP/2 302 
date: Wed, 19 Sep 2018 14:11:16 GMT
content-type: text/plain; charset=utf-8
content-length: 48
set-cookie: __cfduid=d1bb3a46a6c10a853ef4f2f6f8ad71eed1537366276; expires=Thu, 19-Sep-19 14:11:16 GMT; path=/; domain=.codedragon.org; HttpOnly; Secure
x-powered-by: Express
location: https://www.codedragon.org
vary: Accept
set-cookie: session=eyJ2aXNpdGluZyI6Ii8ifQ==; path=/; expires=Thu, 20 Sep 2018 14:11:16 GMT; secure; httponly
set-cookie: session.sig=G-fEgF8Ez_KrRDcWvPymSUv8uDA; path=/; expires=Thu, 20 Sep 2018 14:11:16 GMT; secure; httponly
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 45cca3fcca7e3452-LHR

and HTTP redirects to HTTPS in both cases.

Could the SRV records still be the issue, or it it SSL? Again, any help is greatly appreciated.


#5

Is it possible there is a Page Rule to redirect to www. or a redirect on the server?


#6

We’re not entirley sure. Here are our Page Rules:


#7

Here are the SRV records as well:

For port 2052 (HTTP)
image
image

For port 2053 (HTTPS)
image
image


#8

Cloudflare doesn’t provide port translation. A connection on port 80 is proxied to port 80 on the origin. This could be achieved using either workers to perform the translation of port or using Argo Tunnels to publish to 443.

To access the site as currently configured directly you would need to do https://moodle.codedragon.org:2053 in the browser.


#9

Yeah, stupid me…


#10

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