Update INSTALL.md #10

Merged
AndyHee merged 5 commits from master into master 2018-11-14 16:08:47 +01:00
AndyHee commented 2018-11-12 15:37:34 +01:00 (Migrated from github.com)

Add Nginx configuration line

Add Nginx configuration line
MrPetovan commented 2018-11-12 15:44:20 +01:00 (Migrated from github.com)

Thanks for your contribution, what about URL rewriting? On Apache it is taken care of by the .htaccess file in public/ but it won't be picked up by nginx.

Thanks for your contribution, what about URL rewriting? On Apache it is taken care of by the `.htaccess` file in `public/` but it won't be picked up by nginx.
AndyHee commented 2018-11-12 15:52:05 +01:00 (Migrated from github.com)

I'm not sure I understand the issue. I have this line:

  # rewrite to front controller as default rule
  location / {
    rewrite ^/(.*) /index.php?q=$uri&$args last;
  }

Does that make sense?

I'm not sure I understand the issue. I have this line: ``` # rewrite to front controller as default rule location / { rewrite ^/(.*) /index.php?q=$uri&$args last; } ``` Does that make sense?
MrPetovan commented 2018-11-12 16:00:42 +01:00 (Migrated from github.com)

Not using nginx, I'd be unable to tell, but if it works for you then it should be ok.

Not using nginx, I'd be unable to tell, but if it works for you then it should be ok.
AndyHee commented 2018-11-12 16:04:24 +01:00 (Migrated from github.com)
Ahh.. There is actually an issue. Compare this: https://dir.hubup.pro/search?q=art https://dir.friendica.mrpetovan.com/search?q=art
MrPetovan commented 2018-11-12 16:08:10 +01:00 (Migrated from github.com)

Indeed. Looking into the Apache rewriting, it turns out there's no translation from the URI to a query string. The q=$uri may be extraneous in your example.

Indeed. Looking into the Apache rewriting, it turns out there's no translation from the URI to a query string. The `q=$uri` may be extraneous in your example.
AndyHee commented 2018-11-12 17:24:24 +01:00 (Migrated from github.com)

It's a puzzle everything works apart from the tag search. Compare:

https://dir.hubup.pro/search?q=linux
https://dir.hubup.pro/search?field=country&q=United%20Kingdom

I've read his nginx page https://www.nginx.com/blog/creating-nginx-rewrite-rules/ but I don't know what I'm looking for.

Do you have any idea what is is not rewritten?

It's a puzzle _everything works_ apart from the tag search. Compare: https://dir.hubup.pro/search?q=linux https://dir.hubup.pro/search?field=country&q=United%20Kingdom I've read his nginx page https://www.nginx.com/blog/creating-nginx-rewrite-rules/ but I don't know what I'm looking for. Do you have any idea what is is not rewritten?
AndyHee commented 2018-11-12 17:40:26 +01:00 (Migrated from github.com)

Error log output

2018/11/12 23:36:32 [error] 2588#2588: *82128 FastCGI sent in stderr: "PHP message: Slim Application Error:
Type: PDOException
Code: HY000
Message: SQLSTATE[HY000]: General error: 1191 Can't find FULLTEXT index matching the column list
File: /var/www/directory/vendor/atlas/pdo/src/Connection.php
Line: 138
Trace: #0 /var/www/directory/vendor/atlas/pdo/src/Connection.php(138): PDOStatement->execute()
#1 /var/www/directory/vendor/atlas/pdo/src/Connection.php(186): Atlas\Pdo\Connection->perform('SELECT p.`id`, ...', Array)
#2 /var/www/directory/src/classes/Models/Profile.php(99): Atlas\Pdo\Connection->fetchAll('SELECT p.`id`, ...', Array)
#3 /var/www/directory/src/classes/Controllers/Web/Search.php(76): Friendica\Directory\Models\Profile->getListForDisplay(20, 0, 'AND MATCH (p.`n...', Array)
#4 /var/www/directory/src/classes/Routes/Http/Search.php(28): Friendica\Directory\Controllers\Web\Search->render(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#5 [internal function]: Friendica\Directory\Routes\Http\S" while reading response header from upstream, client: 171.6.204.7, server: dir.hubup.pro, request: "GET /search?q=art HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "dir.hubup.pro", referrer: "https://dir.hubup.pro/"
Error log output ``` 2018/11/12 23:36:32 [error] 2588#2588: *82128 FastCGI sent in stderr: "PHP message: Slim Application Error: Type: PDOException Code: HY000 Message: SQLSTATE[HY000]: General error: 1191 Can't find FULLTEXT index matching the column list File: /var/www/directory/vendor/atlas/pdo/src/Connection.php Line: 138 Trace: #0 /var/www/directory/vendor/atlas/pdo/src/Connection.php(138): PDOStatement->execute() #1 /var/www/directory/vendor/atlas/pdo/src/Connection.php(186): Atlas\Pdo\Connection->perform('SELECT p.`id`, ...', Array) #2 /var/www/directory/src/classes/Models/Profile.php(99): Atlas\Pdo\Connection->fetchAll('SELECT p.`id`, ...', Array) #3 /var/www/directory/src/classes/Controllers/Web/Search.php(76): Friendica\Directory\Models\Profile->getListForDisplay(20, 0, 'AND MATCH (p.`n...', Array) #4 /var/www/directory/src/classes/Routes/Http/Search.php(28): Friendica\Directory\Controllers\Web\Search->render(Object(Slim\Http\Request), Object(Slim\Http\Response), Array) #5 [internal function]: Friendica\Directory\Routes\Http\S" while reading response header from upstream, client: 171.6.204.7, server: dir.hubup.pro, request: "GET /search?q=art HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "dir.hubup.pro", referrer: "https://dir.hubup.pro/" ```
MrPetovan commented 2018-11-12 19:10:58 +01:00 (Migrated from github.com)

Arg, I found the issue. I got this error before so I quickly updated the schema on my database but I didn’t reflect the change in the migration script.

Arg, I found the issue. I got this error before so I quickly updated the schema on my database but I didn’t reflect the change in the migration script.
MrPetovan commented 2018-11-12 20:28:01 +01:00 (Migrated from github.com)

Please update to the latest master, I won't push a release until I can make a proper project archive.

Please update to the latest master, I won't push a release until I can make a proper project archive.
MrPetovan commented 2018-11-13 01:36:57 +01:00 (Migrated from github.com)

New release v2.0.4 pushed, I changed the INSTALL instructions, which makes conflicts with your changes.

New release v2.0.4 pushed, I changed the INSTALL instructions, which makes conflicts with your changes.
AndyHee commented 2018-11-13 05:13:59 +01:00 (Migrated from github.com)

Well done, Hypolite! Glad you found it. Thanks!

I'll update to the new release this evening, test the nginx configuration again, and resolve the conflict.

Also I'll be adding some tags to my profile soon too. ^-^

Well done, Hypolite! Glad you found it. Thanks! I'll update to the new release this evening, test the nginx configuration again, and resolve the conflict. Also I'll be adding some tags to my profile soon too. ^-^
MrPetovan commented 2018-11-13 16:54:16 +01:00 (Migrated from github.com)

Do you plan to add the nginx rewrite rule?

Do you plan to add the nginx rewrite rule?
AndyHee commented 2018-11-13 17:05:40 +01:00 (Migrated from github.com)

I was planning to, but something is still not working. It's not populating the directory properly. Logs look ok.

All three profile entries you see https://dir.hubup.pro/ are added manually via console.

This is the only error I can see.

bin/console dbupdate Updating database schema to latest version... [Error] Database was not fully updated. Use --force for migrate

Could this be a permission issue? I'm running this under a dedicated user that is part of the www-data group. Cron job also runs under this user.

I was planning to, but something is still not working. It's not populating the directory properly. Logs look ok. All three profile entries you see https://dir.hubup.pro/ are added manually via console. This is the only error I can see. `bin/console dbupdate Updating database schema to latest version... [Error] Database was not fully updated. Use --force for migrate` Could this be a permission issue? I'm running this under a dedicated user that is part of the www-data group. Cron job also runs under this user.
AndyHee commented 2018-11-13 17:10:51 +01:00 (Migrated from github.com)

I did a clean installation today with the latest master because of the above db error.

Searching tags is now working but profile_poll_queue is the only table that is empty in the db.

(Signing off now. Catch you later. Cheers.)

I did a clean installation today with the latest master because of the above db error. Searching tags is now working but `profile_poll_queue` is the only table that is empty in the db. (Signing off now. Catch you later. Cheers.)
MrPetovan commented 2018-11-13 17:12:35 +01:00 (Migrated from github.com)

Can you please add

"logger": {
    "level": 100
}

at the same level as "database" in your config/local.json?

Can you please add ``` "logger": { "level": 100 } ``` at the same level as `"database"` in your `config/local.json`?
MrPetovan commented 2018-11-14 02:52:27 +01:00 (Migrated from github.com)

Did you add a remote directory to your poll queue like bin/console directory-add https://dir.friendica.social? If you didn't, then you won't get much data.

Did you add a remote directory to your poll queue like `bin/console directory-add https://dir.friendica.social`? If you didn't, then you won't get much data.
AndyHee commented 2018-11-14 02:58:34 +01:00 (Migrated from github.com)

Yep. I've added two remote directories. This one and Adam's.

I'll add the logger level this evening and report back. Lets just wait with this PR until everything works properly and then I update the rewrite rules.

Yep. I've added two remote directories. This one and Adam's. I'll add the logger level this evening and report back. Lets just wait with this PR until everything works properly and then I update the rewrite rules.
AndyHee commented 2018-11-14 03:01:59 +01:00 (Migrated from github.com)

Interestingly the server list of the directory is filling up as expected; it's only the profiles that don't seem to work.

Interestingly the server list of the directory is filling up as expected; it's only the profiles that don't seem to work.
MrPetovan commented 2018-11-14 04:07:31 +01:00 (Migrated from github.com)

Found the issue, a wrong boolean condition: https://github.com/friendica/friendica-directory/releases/tag/v2.0.6

Your directory should fill up next time the directories will be polled. You can set the next_poll column to NOW() in the directory_poll_queue table to force the issue.

Found the issue, a wrong boolean condition: https://github.com/friendica/friendica-directory/releases/tag/v2.0.6 Your directory should fill up next time the directories will be polled. You can set the `next_poll` column to `NOW()` in the `directory_poll_queue` table to force the issue.
AndyHee commented 2018-11-14 04:40:33 +01:00 (Migrated from github.com)

Great. I'll update to 2.0.6 as soon as I have shell access. Thanks!

Great. I'll update to 2.0.6 as soon as I have shell access. Thanks!
AndyHee commented 2018-11-14 15:42:40 +01:00 (Migrated from github.com)

Now, it works like a charm!

Could you please review the rewrite settings. Some of it might be superfluous; it works though.

Now, it works like a charm! Could you please review the rewrite settings. Some of it might be superfluous; it works though.
MrPetovan (Migrated from github.com) reviewed 2018-11-14 15:47:52 +01:00
@ -62,6 +62,22 @@ In your Virtual Host file, set your document root as follow:
DocumentRoot /path/to/friendica-directory/public/
MrPetovan (Migrated from github.com) commented 2018-11-14 15:47:46 +01:00

Are you sure you need the q=$uri here?

Are you sure you need the `q=$uri` here?
AndyHee (Migrated from github.com) reviewed 2018-11-14 15:54:34 +01:00
@ -62,6 +62,22 @@ In your Virtual Host file, set your document root as follow:
DocumentRoot /path/to/friendica-directory/public/
AndyHee (Migrated from github.com) commented 2018-11-14 15:54:33 +01:00

Not required. I removed it.

    try_files $uri /index.php?$args;

What about these ttf|woff|svg ?

Not required. I removed it. ```suggestion try_files $uri /index.php?$args; ``` What about these `ttf|woff|svg` ?
MrPetovan (Migrated from github.com) reviewed 2018-11-14 16:08:08 +01:00
@ -62,6 +62,22 @@ In your Virtual Host file, set your document root as follow:
DocumentRoot /path/to/friendica-directory/public/
MrPetovan (Migrated from github.com) commented 2018-11-14 16:08:07 +01:00

We use fontawesome so I would keep the mentions of the fonts and svg files.

We use fontawesome so I would keep the mentions of the fonts and svg files.
MrPetovan (Migrated from github.com) approved these changes 2018-11-14 16:08:23 +01:00
MrPetovan commented 2018-11-14 16:08:44 +01:00 (Migrated from github.com)

Thanks for your contribution!

Thanks for your contribution!
AndyHee (Migrated from github.com) reviewed 2018-11-14 16:09:03 +01:00
@ -62,6 +62,22 @@ In your Virtual Host file, set your document root as follow:
DocumentRoot /path/to/friendica-directory/public/
AndyHee (Migrated from github.com) commented 2018-11-14 16:09:03 +01:00

OK. Thanks.

OK. Thanks.
AndyHee commented 2018-11-14 16:09:58 +01:00 (Migrated from github.com)

My pleasure!

My pleasure!
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: friendica/friendica-directory#10
No description provided.