lbausch / SQLgreyGUI

Web interface for SQLgrey built on Laravel 5
https://lbausch.github.io/SQLgreyGUI/
MIT License
11 stars 4 forks source link

"login" not found #12

Closed jrnichols closed 8 years ago

jrnichols commented 8 years ago

Fresh install, no errors so far. When I try to hit the public directory, I simply get a 404..

The requested URL /sqlgrey/public/login was not found on this server.

Looked through the zip and didn't see anything missing. Hopefully it's just a simple error on my part...

lbausch commented 8 years ago

Does your web server have modrewrite enabled?

jrnichols commented 8 years ago

Thanks for the reply. Yep! mod_rewrite is enabled. I'm getting this in the logs:

[Wed Jun 29 23:54:27.259909 2016] [:error] [pid 22456] [client 69.181.43.14:64530] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/html/sqlgrey/storage/logs/laravel-2016-06-30.log" could not be opened: failed to open stream: Permission denied' in /var/www/html/sqlgrey/bootstrap/cache/compiled.php:13678\nStack trace:\n#0 /var/www/html/sqlgrey/bootstrap/cache/compiled.php(13766): Monolog\Handler\StreamHandler->write(Array)\n#1 /var/www/html/sqlgrey/bootstrap/cache/compiled.php(13616): Monolog\Handler\RotatingFileHandler->write(Array)\n#2 /var/www/html/sqlgrey/bootstrap/cache/compiled.php(13377): Monolog\Handler\AbstractProcessingHandler->handle(Array)\n#3 /var/www/html/sqlgrey/bootstrap/cache/compiled.php(13475): Monolog\Logger->addRecord(400, Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)\n#4 /var/www/html/sqlgrey/bootstrap/cache/compiled.php(13170): Monolog\Logger->error(Object(Symfony\Component\Debug\Exception\FatalErrorException), Array)\n#5 /var/www/html/sqlgrey/bootstrap/cache/compiled.php(13141): Illuminate\Log\Writer->writeLog(' in /var/www/html/sqlgrey/bootstrap/cache/compiled.php on line 13678 ^C

the entire sqlgrey directory is owned by www-data:www-data too. (I had goofed that before, changed permissions, and am still getting the same thing.)

lbausch commented 8 years ago

Seems like you have permission problems anyway, since /var/www/html/sqlgrey/storage/logs/ cannot be written to by the webserver.

Did you double check step 2 of the installation instructions: "make your webserver use the public directory as document root"?

jrnichols commented 8 years ago

Fixed the permissions errors. www-data can read/write to the logs directory just fine now. I have virtual hosts, but I went ahead and added a subdomain and it's using the public directory as the document root. Still getting a 404.

"[02/Jul/2016:15:36:36 -0400] "GET /login HTTP/1.1" 404 559 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0""

If I type in the URL and reload, I see it redirect to /login but then it 404s.

lbausch commented 8 years ago

Well, that's odd. Can you post the output of php artisan route:list? Also try to set APP_DEBUG to true in .env and see if this shows some relevant information.

jrnichols commented 8 years ago

screen shot 2016-07-02 at 3 35 35 pm

there's the route:list output (did a screenshot for cleanliness) - I set app_debug to true and hit it again with a browser, and just a 404 displayed in Firefox. (Unless debug=true causes more logs somewhere else? I'm not terribly familiar with artisan at all)

lbausch commented 8 years ago

Thanks, I suppose your Apache configuration needs some tweaking. Can you add an AllowOverride All to your VirtualHost definition:

<Directory /var/www/>
    ...
    AllowOverride All
    ...
</Directory>

Just to make sure mod_rewrite is enabled: apache2ctl -M | grep rewrite

jrnichols commented 8 years ago

root@pile:/var/log/apache2# apache2ctl -M | grep rewrite rewrite_module (shared) root@pile:/var/log/apache2#

Added the AllowOverride statement (for /var/www/sqlgrey/public) and I was able to bring up the login.

.... and login successfully. and it's beautiful! :-)

lbausch commented 8 years ago

Good to hear it works. :+1: