如何在IIS 7.5上设置Laravel项目? [英] How can I setup an Laravel project on IIS 7.5?

查看:1324
本文介绍了如何在IIS 7.5上设置Laravel项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Laravel框架编写的php应用程序。我使用运行良好的XAMPP服务器开发它。



我想将它移动到生产服务器,我可以使用IIS 7.5来管理我的应用程序。



这是我做的事情


  1. 我安装了IIS

  2. 我安装了 PHP Manager

C中创建一个名为 laravel 的文件夹:C:\inetpub \ www.root
2.使用PHP管理器我将PHP版本更改为5.6.18
3.在我的版本5.6.18的php.ini中,我启用了以下行



'BLOCKQUOTE>

 的extension_dir = EXT 
的cgi.force_redirect = 0
cgi.fix_pathinfo = 1个
的fastcgi .impersonate = 1
fastcgi.logging = 0
extension = php_mbstring.dll
extension = php_exif.dll;必须MBSTRING因为它依赖于它之后
延长=激活php_mysql.dll
延长= php_mysqli.dll
延长= php_openssl.dll
延长= php_pdo_mysql.dll
日期.timezone =在这里输入你的时区
session.entropy_length = 32





  1. 我用php 5.6.18安装了作曲家

  2. 我导入了 .httaccess 使用IIS中的URL重写模型位于公用文件夹中的文件。此步骤创建了一个 web.config 文件。然后我将其移动到公共文件夹。

  3. 我将 Laravel 转换为IIS中的应用程序

  4. 我在我的laravel的根目录中添加了phpinfo.php文件,我可以通过浏览器看到它。

但我无法访问我的laravel应用程序。



当我转到 http://localhost/laravel/public/index.php 我收到错误

  HTTP 500内部错误

我按照下面的博客来了解我现在的位置



http://alvarotrigo.com/blog/installing-laravel-4-in-windows-7-with-iis7/



https://laracasts.com/discuss/channels/general-discussion/iis7-laravel-5?page=2



我怎样才能得到laravel app要运行吗?

解决方案

我终于明白了。



除了2件事,我所做的一切都是正确的


  1. 我陈将应用程序上的物理路径指向公用文件夹而不是根目录。

  2. I IIS用户需要对 bootstrap / cache <拥有完全控制权限/ code>和存储<<这是让一切运转起来非常关键的一步

现在一切正常。


I have a php application that I write using Laravel framework. I developed it using XAMPP server which was running fine.

I want to move it to a production server where I can use IIS 7.5 to manage my applications.

Here is what I have done

  1. I installed IIS
  2. I installed PHP Manager

Created a folder called laravel in C:\inetpub\wwwroot 2. Using PHP Manager I changed the PHP version to 5.6.18 3. In my php.ini of the version 5.6.18 I enabled the following lines

extension_dir = "ext"
cgi.force_redirect = 0
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
fastcgi.logging = 0
extension=php_mbstring.dll
extension=php_exif.dll      ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll
date.timezone = "ENTER YOUR TIMEZONE HERE"
session.entropy_length = 32

  1. I installed composer with php 5.6.18
  2. I imported the .httaccess file located in the public folder using URL Rewrite Model in IIS. This step created a web.config file. Then I moved it to the public folder.
  3. I converted my Laravel to Application in IIS
  4. I added phpinfo.php file in the root of my laravel all and I was able to see it via the browser.

But I can't access my laravel app.

When I go to http://localhost/laravel/public/index.php I get an error

HTTP 500 Internal error

I followed the blogs below to get where I am at now

http://alvarotrigo.com/blog/installing-laravel-4-in-windows-7-with-iis7/

https://laracasts.com/discuss/channels/general-discussion/iis7-laravel-5?page=2

How can I get laravel app to run?

解决方案

I finally figure it out.

Everything I have done was correct except of 2 things

  1. I changed the Physical Path on the application to point to the public folder instead of the root.
  2. I IIS User need to have full control permission on the bootstrap/cache and storage << this is very critical step to get everything to work

Everything is running fine now.

这篇关于如何在IIS 7.5上设置Laravel项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆