问题描述
我想建立一个中的这种意志代理的请求。这里是什么我都试过了,但它不似乎喜欢从HTTP到HTTPS?
I'm trying to set up a simple proxypass in Apache httpd that will proxy certain requests. Here is what I have tried, but it doesnt seem to like the change from http to https?
ProxyPass /maps https://maps.googleapis.com/maps
也许我缺少一个额外的步骤?
Perhaps I am missing an extra step?
我读了一些关于设置证书但这似乎长篇大论对于这样一个简单的任务?
I have read a little about setting up certificates but this seems to be long winded for such a simple task?
结果我得到的是目前一个500错误。
The result I get currently is a 500 error.
推荐答案
好读了许多解决方案,涉及设立证书和虚拟主机等等等等之后,我终于发现,不需要任何的一个基本的配置。
Ok after reading many solutions that involved setting up certificates, and virtual hosts etc etc. I finally found a basic config that does not require any of that.
下面是我用来访问代理服务器自动完成谷歌的地方通过本地主机上的Apache的,包括SSL支持的安装要求(的)。
Here is what I have used to access proxy autocomplete google places requests through local host on an installation of Apache including ssl support (version 2.2 for windows).
编辑Apache文件httpd.conf
Edit the apache file httpd.conf
打开所需的模块...
turn on the required modules...
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule ssl_module modules/mod_ssl.so
转到文件的底部,并添加下面的配置mod_proxy的...
go to the bottom of the file and add the following configuration for mod_proxy...
<IfModule mod_proxy.c>
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyEngine on
ProxyPass /maps https://maps.googleapis.com/maps
ProxyPassReverse /maps https://maps.googleapis.com/maps
</IfModule>
多数民众赞成它,其余的是当我从Apache安装的所有默认配置设置。
Thats it, the rest was all default configuration settings from when I installed Apache.
有关Apache代理进一步配置的详细信息可以在
Further configuration details relating to apache proxy can be found at the Apache mod_proxy docs.
一般的Apache 。
General Apache docs for version 2.2.
这篇关于Apache的配置:如何PROXYPASS HTTP请求到https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!