Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

208
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda