Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

595
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda