when you go to the login page what do you see? is the error coming from apache or php?
Right now I get a different message from apache2 error log. But then again I have been editing some stuff in apache2 main configuration file and sites enabled.
This is what I get now: [:error] [pid 20865] [client ...] script '/var/www/laravel/public/wp-login.php' not found or unable to stat
Before I got the landing page to work the apache error log clearly said DENY, and now it's like this. Do you think maybe the problem is in Laravel, and by that I mean some configuration issue in /config or /public?
I get several different errors (apache2 error log). Most recent: core error Invalid URI in request
Also, I set this to true to try and further detect where laravel screws up:
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', true),
Your error is with your apache/server config, not a laravel problem
Why does your log report "wp-login.php" - this doesn't look like a laravel request
Some type of rewrite issue perhaps, but that reference to 'wp-login.php' def. should not be there at all. Do you have the .htaccess file that laravel came with in public?
Yea, I'm beginning to suspect "wp-login.php" has nothing to do with Laravel at all.
The .htaccess-file in the /public directory is untouched.
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
And one more thing: this line: sudo chgrp -R webmasters /var/www/html
What does it do? I mean I suspect it creates a www-group - a list of users that grants the permission to create files (and change) in the www-directory (/var/www/html). Laravel should work without defining this group?
Is there anything in the main apache2.conf -file i need to edit? Is this correct?
<Directory /usr/share> AllowOverride None Require all granted </Directory>
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
#<Directory /srv/>
#</Directory>
Oh fuck guys, it works!
I wish I could explain more in detail how I did it but I didn't really follow I just randomly tested things. As I did wrote them down though. Everybody loves happy endings so here's mine.
When I asked the question I placed my project in /var/www - which was wrong! (apparently).
000-default.conf In the apache2 directory in /etc/apache2/sites-available, there's a 000-default.conf -file. That file does not specify a ServerName, so I left it there. That file must be removed (for reasons still unknown to me). Also, when you create a "site" and don't forget to enable it with the a2ensite -command. Have a secondary terminal open to monitor the apache2 error log-file.
Good luck larawan learners!
The above post doesn't look at all as I wrote it, seems like this forum escapes line-breaks at random.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community