Node.js化

[root@lyon sekigawa]# vi /etc/httpd/conf.d/node-proxy.conf

<VirtualHost *:80>
    ServerName 192.168.0.7

    ProxyPreserveHost On
    ProxyRequests Off

    # /tennis へのアクセス → Node.js tennis-app.js
    ProxyPass        "/tennis/"  "http://localhost:3000/tennis/"
    ProxyPassReverse "/tennis/"  "http://localhost:3000/tennis/"

    # /(それ以外)→ Node.js site
    ProxyPass        "/"  "http://localhost:3001/"
    ProxyPassReverse "/"  "http://localhost:3001/"

    ErrorLog /var/log/httpd/tennis_proxy_error.log
    CustomLog /var/log/httpd/tennis_proxy_access.log combined
</VirtualHost>

[root@lyon sekigawa]# systemctl reload httpd
[root@lyon sekigawa]# systemctl restart httpd

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS