M
M
mr_blond972015-09-14 05:44:43
proxy
mr_blond97, 2015-09-14 05:44:43

How to solve the problem with ProxyPass and redirects?

It is necessary to make it so that the subdomain of the third level of the site loads the page from the same site. Subdomain.domain.com should load the domain.com/dir1/dir2 page.

I tried to do Apache for servername Subdomain.domain.com ProxyPass / 127.0.0.1.com/dir1/dir2 in virtualhosts but in this case all links and links to scripts break. Tried to do ProxyPass / domain.com/dir1/dir2 everything works, but I need to redirect from domain.com to https://domain.com . If I enable such a redirect, then after ProxyPass / domain.com/dir1/dir2 , instead of Subdomain.domain.com , https://domain.com will be loaded . Tried doing ProxyPass / https://domain.com/dir1/dir2But since Subdomain.domain.com is loaded via http, an error 500 is generated.

Maybe Apache has some kind of proxy pass alternative? Is it possible to solve the problem of the 500 error when you need to load data into a page with http from a page with https? Is it possible to somehow make an exception so that the redirect from domain.com to https://domain.com does not work if you access the server from a specific IP?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mr_blond97, 2015-09-14
@mr_blond97

Redirect IP Exception:
RewriteEngine On RewriteCond %{HTTPS} off ReWriteCond %{REMOTE_ADDR} !^11\.11\.11\.11$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} where 11.11.11.11 ProxyPass server
ip / 11.11.11.11.com/dir1/dir2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question