前端项目由nginx迁移到apache httpd

前端项目由nginx迁移到apache httpd

前端项目存放目录为 /var/www/dist
虚拟主机端口80
反向代理拦截 /prod-api
后端服务地址 http://192.168.0.44:8097

<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>

小尾巴~~
只要有积累,就会有进步

你可能感兴趣的:(linux,nginx,httpd,nginx,apache)