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

210
Views
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
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!