How to use vhosts alongside node-http-proxy?

前端 未结 4 519
太阳男子
太阳男子 2020-11-29 06:54

I\'m running Nodejs and Apache alongside each other.

node-http-proxy is listening on port 80 and then forwarding requests to either Apache(:9000) or to Express(:8000

4条回答
  •  鱼传尺愫
    2020-11-29 07:22

    I took some inspiration from @uglymunky and wrote a chef script to do this on Ubuntu.

    With this script you can install express and apache with vhost support on a single server using 1 line after you pull down my chef project from github

    https://github.com/toranb/ubuntu-web-server

    If you have git installed and you pull it down you can kick it off like so ...

    sudo ./install.sh configuration.json
    

    This does require Ubuntu 12.04 or greater as I took advantage of an upstart script to start node when you reboot the machine

    When the script is finished you will have a working ubuntu web server with express to run any node apps you configured, along side apache to run any wsgi apps you configured

提交回复
热议问题