简体   繁体   English

aws ec2 lighsail nginx 未指向 laravel

[英]aws ec2 lighsail nginx not pointing to laravel

I'm very new to deploying on server.我对在服务器上部署非常陌生。 I followed this tutorial to deploy my laravel project from github and successfully completed all steps.我按照本教程从 github 部署了我的 laravel 项目并成功完成了所有步骤。

But when I point to my instance ip on browser, it loads nginx homepage rather than laravel.但是当我在浏览器上指向我的实例 ip 时,它会加载 nginx 主页而不是 laravel。

check 1: sudo nano /etc/php-fpm.d/www.conf检查1: sudo nano /etc/php-fpm.d/www.conf

; Note: This value is mandatory.
listen = 127.0.0.1:8080

I suppose this means the instance should listen to laravel instead of any other?我想这意味着实例应该听 laravel 而不是其他?

What I suspect is, sudo nano /etc/nginx/sites-available/myapp.site the myapp.site is empty.我怀疑的是, sudo nano /etc/nginx/sites-available/myapp.site myapp.site 是空的。 It suppose to create symlinks I suppose.我想它应该创建符号链接。 How can I solve this issue?我该如何解决这个问题?

This is what I see on browser for my instance ip: nginx welcome page这是我在浏览器上看到的实例 ip: nginx 欢迎页面

The contents of /etc/nginx/sites-available/myapp.site should contain the value of this file according to this tutorial.根据本教程,/etc/nginx/sites-available/ /etc/nginx/sites-available/myapp.site的内容应包含此文件的值。

Once it contains these contents perform the following actions:一旦它包含这些内容,请执行以下操作:

  • sudo ln -s /etc/nginx/sites-available/myapp.site /etc/nginx/sites-enabled/myapp.site
  • sudo service nginx restart

Assuming the remaining parts of the tutorial are followed you should now be able to see your site.假设遵循本教程的其余部分,您现在应该能够看到您的站点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM