欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

laravel5网站环境配置安装求助

程序员文章站 2022-03-20 23:22:54
...
laravel5框架网站安装到服务器后台界面显示,但是登录不进去,其他页面都是404,目前服务器环境:nginx/1.4.4 、mysql5.6.21、PHP5.6.22;

.env如下:

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

.htaccess如下:


        Options -MultiViews
    

    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]

nginx.conf:

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;
    }
}  

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