前端项目由nginx迁移到apache httpd

前端项目由nginx迁移到apache httpd

前端项目存放目录为 /var/www/dist

虚拟主机端口80

反向代理拦截 /prod/api

后端服务地址 http://192.168.0.44:8097

java 复制代码
<VirtualHost *:80>
    DocumentRoot /var/www/dist
    ServerName www.dist.com
    <Directory /var/www/dist>
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . index.html [L]
        SetOutputFilter DEFLATE
        Options FollowSymLinks
        AllowOverride All
        Require all granted
        DirectoryIndex index.php index.html index.htm default.php default.html default.htm
    </Directory>
    ProxyRequests off
    ProxyPass /prod-api http://192.168.0.44:8097
    ProxyPassReverse /prod-api http://192.168.0.44:8097
</VirtualHost>

小尾巴~~

只要有积累,就会有进步

相关推荐
天宇&嘘月19 小时前
Nginx的https搭建
网络·nginx·https
wadesir1 天前
Nginx负载均衡代理协议详解(从零开始搭建高可用Web服务)
前端·nginx·负载均衡
w***4241 天前
准确-NGINX 1.26.2配置正向代理并编译安装的完整过程
运维·nginx
b***59431 天前
在 Ubuntu 22.04 上安装和配置 Nginx 的完整指南
linux·nginx·ubuntu
神秘的土鸡1 天前
Linux中使用Docker构建Nginx容器完整教程
linux·nginx·docker
i***51261 天前
Failed to restart nginx.service Unit nginx.service not found
运维·nginx
b***59431 天前
【Nginx 】Nginx 部署前端 vue 项目
前端·vue.js·nginx
8***84821 天前
Nginx代理到https地址忽略证书验证配置
运维·nginx·https
a***11351 天前
用nginx正向代理https网站
运维·nginx·https