我一直在寻找关于如何在Openshift中使用和配置Laravel的教程和墨盒无济于事 . 即使是我能找到的最好的东西也没那么大 . 到目前为止我能够做的就是设置Laravel所以我可以在中间看到欢迎页面“Laravel” .

我做到这一点是使用这两个墨盒:

随着https://github.com/lucho2d7/openshift-quickstart-laravel5.2

基本上将所有这些放在一个rhc命令中:

rhc app create appname --env OPENSHIFT_PHP_VERSION=5.6.16 http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-php mysql-5.5 --env OPENSHIFT_NGINX_VERSION=1.9.12 http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-nginx --from-code=https://github.com/lucho2d7/openshift-quickstart-laravel5.2

这基本上在Openshift上创建了一个带有Nginx 1.9.12,PHP 5.6.16,MySQL 5.5和Laravel 5.2.12的应用程序:

Openshift App

我做的下一件事是我注意到了Laravel 5.2.12并在目录中运行了 composer update 并将其送到了Laravel 5.2.30,并且在访问应用程序时我仍然看到了Laravel .

现在出现了问题 . 我使用了自动登录/注册制造商命令

php artisan make:auth

命令运行,所有内容都在相应的文件夹中,当您访问应用程序时,您会看到修改后的欢迎页面,其右上角是登录和注册按钮:

Laravel Welcome Page

但是,当您单击“登录”,“注册”和“主页”时,页面上会出现404 not found错误:

Error page

其他按钮的路径是相同的,例如按下登录将我带到/ login,Register将我带到/注册,Home将我带到/ home,同时给我错误页面 .

我无法找到解决这个问题的方法 . 到目前为止,我已经尝试将我的URL添加到config文件夹中的app.php文件中,除此之外没有其他任何内容被触及 . 我真的无法访问httpd.conf文件或在服务器中使用sudo . 虽然我尝试查看错误日志,但无法通过它找到解决方案 .

错误日志基本上只是为不同的错误路径重复这一行:

2016/04/26 00:18:27 [error] 337780#0: *121 open() "/var/lib/openshift/username/app-root/runtime/repo//public/login" failed (2: No such file or directory), client: ip, server: , request: "GET /login HTTP/1.1"

我实际上可以访问/ var / lib / openshift / username / nginx / conf中的nginx_http.conf,它目前有以下内容:

# Enable Gzip
gzip  on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_min_length 1100;
gzip_buffers     4 8k;
gzip_proxied any;
gzip_types
  # text/html is always compressed by HttpGzipModule
  text/css
  text/javascript
  text/xml
  text/plain
  text/x-component
  application/javascript
  application/json
  application/xml
  application/rss+xml
  font/truetype
  font/opentype
  application/vnd.ms-fontobject
  image/svg+xml;

gzip_static on;
gzip_proxied        expired no-cache no-store private auth;
gzip_disable        "MSIE [1-6]\.";
gzip_vary           on;

server {
    listen  ip:8080;
    root    /var/lib/openshift/username/app-root/runtime/repo//public;

    location / {
        index  index.html index.htm index.php;
    }

    # pass the PHP scripts to PHP-FPM
    location ~ \.php$ {
        fastcgi_pass unix:/var/lib/openshift/username/php//socket/php-username.socket;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        include /var/lib/openshift/username/nginx//usr/nginx-1.9.12/conf/fastcgi_params;
    }
}

任何帮助都会有很大的帮助!