首页 > 解决方案 > 从同一域运行 prestashop 应用程序和 Angular 应用程序

问题描述

我有两个应用程序:一个 Prestashop php 应用程序和一个 Angular 10 应用程序。我想要实现的是:当我导航到“http://example.com/”时,角度应用程序应该响应,当我导航到“http://example.com/shop/”时,我应该在 prestashop店铺。现在我实现的是:当我导航到“http://example.com/app/”时,角度应用程序会响应,当我导航到“http://example.com/”时,prestashop 应用程序会响应。

Apache 虚拟主机配置是这样的:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/prestashop/"
    <Directory "/Applications/XAMPP/xamppfiles/htdocs/prestashop/">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride All        
        Require all granted
    </Directory>
<IfModule mod_proxy.c>
    ProxyRequests Off
    ProxyVia Off
    ProxyPreserveHost On
    ProxyStatus On
    ProxyPass           /app/    http://localhost:4200/
    ProxyPassReverse    /app/    http://localhost:4200/
</IfModule>
</VirtualHost>

我应该怎么办?

标签: phpangularapacheproxymod-proxy

解决方案


推荐阅读