search

Home  >  Q&A  >  body text

Analysis of running problems of Laravel Sail Docker on local host

<p>I downloaded the Windows version of Docker and installed it successfully, I created a new Laravel project and installed Sails, the installation was successful. </p> <p>But when I run the "sails up" command (sails is an alias), and then type localhost in the browser, it takes me to an Ubuntu page instead of the Laravel homepage, and if I use Laravel.test, A not found error page will be displayed. </p> <p>How can I solve this problem. </p> <pre class="brush:php;toolbar:false;">.[[enter image description here](https://i.stack.imgur.com/AmBIY.jpg)](https://i. stack.imgur.com/uYH2a.jpg)</pre> <p><br /></p>
P粉953231781P粉953231781473 days ago565

reply all(1)I'll reply

  • P粉547170972

    P粉5471709722023-08-15 00:15:48

    You can try editing your APP_PORT in your .env file, like this:

    APP_PORT=3001 // 或者你喜欢的任意端口号

    Afterwards you can re-run your sail command:

    sail up

    Now, you should be able to access your website via localhost:3001.

    The reason why your sail up command fails may be because your PORT number 80 has been used by other software (such as nginx or apache) is occupied.

    reply
    0
  • Cancelreply