Trouble with Vagrant - “404 - Not Found”

前端 未结 5 1134
逝去的感伤
逝去的感伤 2021-02-09 10:47

I am attempting to make a LAMP box using Vagrant. I have been told that it is quite simple to use. I am completely new to networks and virtual machines and have very little expe

5条回答
  •  情书的邮戳
    2021-02-09 11:37

    There are two issues in bootstrap.sh

    1. You need start the web service. You can also vagrant ssh to manually start it
    2. You need make soft link, not hard link.

    So the script will be updated as

    $ cat bootstrap.sh
    #!/usr/bin/env bash
    
    apt-get update
    apt-get install -y apache2
    if ! [ -L /var/www ]; then
      rm -rf /var/www
      ln -s /vagrant /var/www
    fi
    
    service apache2 start
    

提交回复
热议问题