如何在反向代理中更改URL?

时间:2019-06-02 06:31:01

标签: apache mod-rewrite reverse-proxy mod-proxy

我当前的反向代理设置将寻址到https://example.com/domain的请求重定向到我的后端服务器333.333.333.333/域。

我希望它仅将https://example.com的流量发送到同一地址。我的意思是说我希望/ domain从客户端的URL中删除。

我当前的配置如下:

    ServerName example.com
    SSLProxyEngine on
    ProxyPreserveHost on
    DocumentRoot /var/www/html
    ProxyPass /.well-known !
    ProxyPass / http://333.333.333.333/
    ProxyPassReverse / http://333.333.333.333/domain/
# RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

#RewriteCond %{SERVER_NAME} =example.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]


Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/key.pem

如果有什么不同,我有一个wordpress网站在后端的virtualmin / webmin上运行。

我需要进行哪些更改?

0 个答案:

没有答案