标签归档:反向代理

nginx 配置模板

静态html

server {
    listen 80;
    server_name  _;
    root   /home/www;
    index  index.html;
}

http 跳转 https

server {
    listen 80;
    server_name  domain;

    return 301   https://$host$request_uri;
    #rewrite ^(.*)$  https://$host$1 permanent;
}

继续阅读

apache 反向代理

要先启用组件:a2enmod rewrite proxy ,确认开启以下组件: proxyproxy_connecthttp

<VirtualHost *:80>
        AllowEncodedSlashes On
        ProxyPass / http://localhost:88/
        ProxyPassReverse / http://localhost:88/
</VirtualHost>