Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 1 year ago.
0

when you go to the login page what do you see? is the error coming from apache or php?

0

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?

0

I get several different errors (apache2 error log). Most recent: core error Invalid URI in request

0

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),
0

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

0

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?

0

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.

0
<IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule>
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>
0

Do I have to install git to get laravel to work?

0

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?

0

Is there anything in the main apache2.conf -file i need to edit? Is this correct?

Sets the default security model of the Apache2 HTTPD server. It does

not allow access to the root filesystem outside of /usr/share and /var/www.

The former is used by web applications packaged in Debian,

the latter may be used for local directories served by the web server. If

your system is serving content from a sub-directory in /srv you must allow

access here, or in any related virtual host.

<Directory /> Options FollowSymLinks AllowOverride None Require all denied </Directory>

<Directory /usr/share> AllowOverride None Require all granted </Directory>

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

#<Directory /srv/>

Options Indexes FollowSymLinks

AllowOverride None

Require all granted

#</Directory>

0

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).

  1. Place the project directory in /var/www/html.

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!

0

The above post doesn't look at all as I wrote it, seems like this forum escapes line-breaks at random.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

muppbarn muppbarn Joined 29 Mar 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.