首页  >  文章  >  后端开发  >  laravel5网站环境配置安装求助

laravel5网站环境配置安装求助

WBOY
WBOY原创
2016-09-22 08:42:181127浏览

laravel5框架网站安装到服务器后台界面显示,但是登录不进去,其他页面都是404,目前服务器环境:nginx/1.4.4 、mysql5.6.21、PHP5.6.22;

.env如下:

<code>APP_ENV=local
APP_DEBUG=true
APP_KEY=Wknod8gk0jUUTTSz3QgbgwgVBmN9afA3

DB_HOST=127.0.0.1
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=*****

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
</code>

.htaccess如下:

<code><ifmodule mod_rewrite.c>
    <ifmodule mod_negotiation.c>
        Options -MultiViews
    </ifmodule>

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</ifmodule>

</code>

nginx.conf:

<code>server {
        listen       80;
        server_name  ***.com;
    index index.html index.htm index.php;
    root /alidata/www/test/public;
    
      try_files $uri $uri/ @rewrite;  
    location @rewrite {  
        rewrite ^/(.*)$ /index.php?_url=/$1;  
    }  
    location ~ .*\.(php|php5)?$
    {
        #fastcgi_pass  unix:/tmp/php-cgi.sock;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi.conf;
    }
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires 30d;
    }
    location ~ .*\.(js|css)?$
    {
        expires 1h;
    }

    include /alidata/server/nginx/conf/rewrite/test.conf;
    access_log  /alidata/log/nginx/access/test.log;
    if (-f $request_filename/index.html){
    rewrite (.*) $1/index.html break;
    }
    if (-f $request_filename/index.php){
    rewrite (.*) $1/index.php;
    }
    if (!-f $request_filename){
    rewrite (.*) /index.php;
    }
}  
</code>

求大神帮忙看看那里没对,O(∩_∩)O谢谢

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn