2

I am new to centos. I have installed apache and php 7. I have also installed all php extensions required for laravel.

I have an laravel app working fine on windows.I have just transferred my code from windows to centos 7.The problem is now it shows 500 internal error in console on every route. I have changed .htaccess code as explained here:

https://laravel.com/docs/5.0/configuration#pretty-urls

folder rights to storage and bootstrap is set to 777, also enabled mod_rewrite.

Also when I installed fresh laravel its not working. When i am updating the main route in web.php from

Route::get('/', function () {
    return view('welcome');
});

to

Route::get('/', function () {
    return 'welcome';
});

It shows welcome message but for

Route::get('/', function () {
    return view('welcome');
}); 

getting 500 internal error in console and blank page appears.

httpd Error log

Ansuya Sindha
  • 119
  • 1
  • 8

2 Answers2

1

Step 1: You have to enable .htaccess by adding this to your vhost:

<Directory /var/www/html/yourfoldername/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

Step 2: And disabled SELinux permanently. Click here

Nileshsinh Rathod
  • 948
  • 1
  • 17
  • 37
0

As your error log file shows , there are a permission issue in writing log files .

you may try :-

1- disable logging , or in other words disable Monolog package "Unrecommended"

2- tracking your error logs shows as said that there are a permission issue in writing logs , as you said :-

folder rights to storage and bootstrap is set to 777

so please make sure that you've changed the storage directory permission to 777 recursively

hassan
  • 7,812
  • 2
  • 25
  • 36