我有一个使用 Laravel 框架编写的 php 应用程序.我使用运行良好的 XAMPP 服务器开发它.
我想将其移至生产服务器,在该服务器上我可以使用 IIS 7.5 来管理我的应用程序.
这是我所做的
在 C:inetpubwwwroot
中创建了一个名为 laravel
的文件夹2. 使用 PHP Manager 我将 PHP 版本更改为 5.6.183. 在我的 5.6.18 版本的 php.ini 中,我启用了以下几行
extension_dir = "ext"cgi.force_redirect = 0cgi.fix_pathinfo = 1fastcgi.impersonate = 1fastcgi.logging = 0扩展=php_mbstring.dll扩展=php_exif.dll;必须在 mbstring 之后,因为它取决于它扩展=php_mysql.dll扩展=php_mysqli.dll扩展=php_openssl.dll扩展=php_pdo_mysql.dlldate.timezone = "在此处输入您的时区"session.entropy_length = 32
.httaccess
文件.这一步创建了一个 web.config
文件.然后我将其移至公用文件夹.Laravel
转换为 IIS 中的应用程序但我无法访问我的 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/频道/一般讨论/iis7-laravel-5?page=2
如何让 laravel 应用程序运行?
我终于弄明白了.
我所做的一切都是正确的,除了两件事
bootstrap/cache
和 storage
有完全控制权限 <<<这是让一切正常运行的非常关键的一步现在一切正常.
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
Created a folder called laravel
in C:inetpubwwwroot
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
.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.Laravel
to Application in IISBut 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
bootstrap/cache
and storage
<< this is very critical step to get everything to workEverything is running fine now.
这篇关于如何在 IIS 7.5 上设置 Laravel 项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!