Start an apache server in any directory from command line

后端 未结 7 1280
故里飘歌
故里飘歌 2020-12-25 12:26

I want to be able to start an apache server from the command line, typing something like apache site-folder or apache . --port=2000

This sh

7条回答
  •  被撕碎了的回忆
    2020-12-25 13:25

    This works:

    Your apache config could point to /var/www

    Then use:

    sudo mount -o bind /home/webcreatorperson/mywebsite /var/www
    

    to unbind use:

    sudo umount /var/www
    

    If you want several ports you could preconfigure ports in apache to point to directories like /var/www/8000.

提交回复
热议问题