【问题标题】:Running spring boot app over apache2 and serving php content在 apache2 上运行 spring boot 应用程序并提供 php 内容
【发布时间】:2016-07-05 06:28:01
【问题描述】:

我的 Spring Boot 应用程序使用代理在 apache 上运行。它还通过安全连接运行。 Apache 虚拟主机配置为:

ProxyPreserveHost On
ProxyPass / https://localhost:8443/
ProxyPassReverse / https://localhost:8443/

我想在文件夹/gettweets 中提供静态内容,这样当用户访问https://myurl/gettweet 时会调用索引php 文件。

我该如何做到这一点?

【问题讨论】:

    标签: php apache apache2


    【解决方案1】:

    使用带有 P 标志的 mod_rewrite 代替:

    RewriteEngine on
    RewriteRule ^gettweet/.*$ /gettweet/index.php [L]
    RewriteRule ^(.*)$ https://localhost:8443/$1 [L,P,QSA]
    

    【讨论】:

      猜你喜欢
      • 2015-05-24
      • 2019-02-13
      • 2018-10-23
      • 2020-10-23
      • 1970-01-01
      • 2021-05-05
      • 2018-07-11
      • 2018-12-28
      • 1970-01-01
      相关资源
      最近更新 更多