前端项目由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>

小尾巴~~

只要有积累,就会有进步

相关推荐
Avan_菜菜1 天前
FRP 内网穿透完整实战:从 HTTP 映射到 HTTPS 自签代理
运维·nginx·https
ping某5 天前
为什么 Nginx 明明监听了 80,转发后端时却用了 4xxxx 端口?
后端·nginx
難釋懷7 天前
Nginx反向代理中的容错机制
运维·nginx
bloglin999997 天前
Nginx高危漏洞CVE-2021-23017及配置样例
运维·nginx
进阶的小名7 天前
Spring Boot SSE + Nginx 配置:解决 EventSource 不实时返回、连接超时、流式响应被缓冲问题
spring boot·后端·nginx
小小龙学IT7 天前
Apache Airflow 2.x 深度指南:用 Python 编排一切的现代化工作流引擎
开发语言·python·apache
難釋懷7 天前
Nginx获取客户端真实IP
服务器·前端·nginx
Shepherd06197 天前
【IT 运维】Apache 使用 mod_remoteip 恢复 Cloudflare 后的真实访客 IP
运维·tcp/ip·apache
qq_谁赞成_谁反对7 天前
甲方IT的成长之路--nginx实战--2604
服务器·数据库·nginx
图灵追慕者7 天前
Nginx安裝以及配置顯示本地服務器文件夾
运维·nginx