Laravel installed, but connection is reset / No da

2020-04-07 06:35发布

I am using Digital Ocean as my server, I have a Ubuntu droplet running laravel fine on my site. But now I am making a 'projects backend' where there is just a folder with test projects that are all laravel projects themselves. They are not linked to the main laravel install.

I installed it, all the files are there if I go to www.mysite.com/projects/projectname it shows:

it shows

But when I go to the link www.mysite,com/projects/projectname/public it shows:

firefox

in firefox

chrome

in chrome

The site is working fine on my laptop using mamp. But not on the server?

If I look in charles (the proxy manager) I get the error / failure Remote server closed the connection before sending response header

I am not familiar with this, please can someone explain how to overcome this problem?

5条回答
Viruses.
2楼-- · 2020-04-07 07:13

Same thing still holds for Laravel 5 and when using opcache instead of xcache. When opcache is enabled I get this error. If I put

php_flag opcache.enable Off

at the top of my. htaccess file, the site loads perfectly.

查看更多
一夜七次
3楼-- · 2020-04-07 07:14

Turning off XCache solved it for me.

查看更多
冷血范
4楼-- · 2020-04-07 07:21

I was having the connection reset with Laravel 4.

The problem was that I was using blade multiline comments in the views.

{{-- 

  line 1

  line 2 

  ....

--}}

When I got rid of that comments the problem of the connection reset was solved.

I'm using blade comments but single line.

{{-- line1 --}

And it's working fine.

查看更多
你好瞎i
5楼-- · 2020-04-07 07:23

This is a known problem, you will need to turn off XCache in your .htaccess like so:

php_flag xcache.cacher Off
php_flag xcache.size 0
php_flag xcache.stat Off

More information: http://laravel.io/forum/08-01-2014-laravel-42-is-conflict-with-php5-xcache-module

查看更多
虎瘦雄心在
6楼-- · 2020-04-07 07:29

We fixed this problem by upgrading PHP to 5.5.22 (5.5.27 now). We had this problem with OPCache in combination with PHP 5.5.11.

Thanks to this post: https://laracasts.com/discuss/channels/general-discussion/opcache-issues

查看更多
登录 后发表回答