Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

590
Views
Reverse proxy an http:// domain to a GitHub Pages URL

I have a URL, http://example.com, that I would like to use to serve content from my GitHub Pages site at https://myusername.github.io/mysite/ via a reverse proxy in Apache. This is both as a temporary workaround until I update example.com's DNS setting to point to GitHub Pages, as well as to teach myself how reverse proxies work.

I have my Apache config like so:

<VirtualHost *:80>
    ServerName example.com
    SSLEngine On
    SSLProxyEngine On
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    ProxyPass "/" "https://myusername.github.io/mysite/" 
</VirtualHost>

When I try to go to "example.com", I get "The proxy server could not handle the request GET /. Reason: Error during SSL Handshake with remote server."

Is what I'm trying to do possible, and if so, what should I be changing?

I'm using Apache 2.2.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

You should probably remove the line:

SSLEngine On

It enables HTTPS on your port 80... but you don't provide an SSL certificate (...and HTTPS uses port 443).
You should also add the line:

ProxyPassReverse "/" "https://myusername.github.io/mysite/"

over 4 years ago · Santiago Trujillo Report

0

The following config works perfectly on reverse proxy github pages

<VirtualHost *:80>
        ServerName custom-domain
        ServerAdmin encycode@gmail.com

        ProxyRequests Off
        ProxyPreserveHost On
        SSLProxyEngine on
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off

        RequestHeader set Host "myusername.github.io"
        RequestHeader set X-Forwarded-Proto https
        RequestHeader set Origin "myusername.github.io"

        ProxyPass / https://myusername.github.io/mysite/
        ProxyPassReverse / https://myusername.github.io/mysite/
</VirtualHost>

Make sure you replace myusername with your github username, mysite with your github repo name and custom-domain with your custom url

over 4 years ago · Santiago Trujillo Report

0

You don't have to implement a reverse proxy yourself, since Github allows you to specify a custom domain

https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github- pages-site

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!