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

209
Visualizações
Rewrite or Redirect NGINX HTTPS to APACHE HTTP

is it possible to rewrite or redirect NGINX HTTPS url to APACHE HTTP url from the front end request? My website is using Nginx web server, but all the others files is in storage server with Apache as it's webserver. Whenever there are any request for files with certain format, it will rewrite to mydomain.com and it's path. This configuration works with NGINX HTTP to APACHE HTTP, bu now, when it turn NGINX HTTPS, it's not working. I couldn't figure what's are the issue here?

log_format main '$remote_addr - $remote_user [$time_local]  $status '
                '$ssl_protocol/$ssl_cipher '
                '"$request" $body_bytes_sent "$http_referer" '
                '"$http_user_agent" "$http_x_forwarded_for"';

access_log      /var/www/html/access.log main;
error_log       /var/www/html/error.log;

server {
                listen        443 ssl;
                server_name   www.example.com;

                ssl_certificate     /etc/ssl/certs/example.crt;
                ssl_certificate_key /etc/ssl/private/exacmple.key;

                root          /var/www/html;
                index         index.php index.html;

                location ~ (.*)\.pdf$ {
                     rewrite ^(.*)$ http://mydomain.xy$1 redirect;
                }

                location ~ "^/photos/(.*)" {
                     rewrite ^(.*)$ "http:/mydomain.xy$1" redirect;

                }

                location ~ (.*)\.xls$ {
                     rewrite ^(.*)$ http://mydomain.xy$1 redirect;
                }

                location ~ (.*)\.zip$ {
                     rewrite ^(.*)$ http://mydomain.xy$1 redirect;
                }

                location / {
                     try_files $uri $uri/ /index.php?$query_string;
                }

                location ~ \.php$ {
                     proxy_pass http://127.0.0.1:8080;
                }

                location ~ /\.ht {
                     deny all;
                }

 }

 server {
                listen      80;
                server_name www.example.com;
                return 301 https://$host$request_uri;
 }
  • The website is in k8s env meanwhile the storage is an external server, outside the kubernetes. All ports have been configured and open.
over 4 years ago · Santiago Trujillo
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