dongwupu5991 2014-04-10 22:36
浏览 43

浏览VPS的IP时不会出现Laravel

I've just installed Laravel 4 with nginx on my ubuntu vps following this tutorial: https://www.digitalocean.com/community/articles/how-to-install-laravel-with-nginx-on-an-ubuntu-12-04-lts-vps

Evertything seemed to be installed fine, however when browsing it's ip adress, I still get:

It works!

This is the default web page for this server. The web server software is running but no content has been added, yet.

I thought this could have something to do with the virtual host, but that one seems to be configured correctlt aswell

server {
    listen   80 default_server;

    root /var/www/laravel/public/;
    index index.php index.html index.htm;

    location / {
         try_files $uri $uri/ /index.php$is_args$args;
    }

    # pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
    location ~ \.php$ {
            try_files $uri /index.php =404;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }
}

Would anynone know what I'm doing wrong? Thank you!

  • 写回答

1条回答 默认 最新

  • dqw7121 2014-04-10 23:37
    关注

    Your web server should point to the /public folder not the root of your laravel application.

    That is /var/www/laravel/public not /var/www/laravel/.

    Also make sure you restart your server to load up configuration files.

    评论

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题