Topics

Tribe Support

Tribe Support's Topics

Pete Jones

September 20 2021

installation

anahitasocial/anahita: Anahita is a platform and framework for developing open science and knowledge sharing applications on a social networking foundation. (github.com)

i havew followed this and everything appears to install.  including setting up of db.  however when i go to the try loggin in or goig to the

/people/signup

the url is not found.  

Is there something that i am missing? 

Pete Jones
September 20 2021 Permalink
I have also tried setting it up based on these instructions

Setup Anahita-React and Anahita Backend as API on Digital Ocean

This article will help developer to setup Anahita ReactJS and Anahita as Backend service on Digital Ocean droplets.

Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
Hi Pete,

Can you see the homepage?

When you click on the login button, does it still tell you that the page isn't found?

Is there a .htaccess file in your www directory?
Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
Also, the Anahita React app is still under active development and unstable. We can't provide support for it yet. You can still play with the code if you are familiar with React apps. The current code in the Anahita React master branch only works with the nohtml branch. The next version of Anahita doesn't have HTML outputs. It only provides a RESTful API.
Pete Jones
September 22 2021 Permalink
thanks for the reply, Rastin.

yes the home page loads up. http://anahita.drmelshealth.com/
Clicking on login button or entering /people/signup do not redirect to any page.

There is an htaccess file. i have pasted it below.
is there something that i need to modify to support url rewriting?


$cat .htaccess
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to anahita!
#
## Deny access to extension xml files (uncomment out to activate)
#
#Order allow,deny
#Deny from all
#Satisfy all
#
## End of deny access to extension xml files
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*([^)]*) [OR]
# Block out any script that includes a tag in URL
RewriteCond %{QUERY_STRING} (|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
########## End - Rewrite rules to block out some common exploits


########## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
########## End - Custom redirects


# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your anahita! Directory (just / for root)

# RewriteBase /


########## Begin - anahita! core SEF Section
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index.php
# and the request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|.(json|php|html?|feed|pdf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
########## End
Pete Jones
September 22 2021 Permalink
i have modified the .htaccess file in the /www

/var/log/apache2$ tail error.log
[Wed Sep 22 09:08:20.509182 2021] [php7:warn] [pid 14236] [client 170.150.22.35:38324] PHP Warning: Invalid argument supplied for foreach() in /home/ubuntu/anahita/src/libraries/anahita/http/url.php on line 321
[Wed Sep 22 09:08:20.509325 2021] [php7:warn] [pid 14236] [client 170.150.22.35:38324] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/ubuntu/anahita/src/libraries/anahita/request/request.php on line 582
[Wed Sep 22 09:08:20.730362 2021] [php7:warn] [pid 14236] [client 170.150.22.35:38324] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/ubuntu/anahita/src/libraries/anahita/request/request.php on line 582
[Wed Sep 22 10:48:14.757195 2021] [php7:warn] [pid 14236] [client 103.210.201.162:58740] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/ubuntu/anahita/src/libraries/anahita/request/request.php on line 582
[Wed Sep 22 10:48:14.972591 2021] [php7:warn] [pid 14236] [client 103.210.201.162:58740] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/ubuntu/anahita/src/libraries/anahita/request/request.php on line 582
[Wed Sep 22 13:47:32.217548 2021] [php7:warn] [pid 14239] [client 184.105.247.195:56222] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/ubuntu/anahita/src/libraries/anahita/request/request.php on line 582
[Wed Sep 22 13:47:32.437857 2021] [php7:warn] [pid 14239] [client 184.105.247.195:56222] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/ubuntu/anahita/src/libraries/anahita/request/request.php on line 582
[Wed Sep 22 15:26:33.438478 2021] [mpm_prefork:notice] [pid 3707] AH00169: caught SIGTERM, shutting down
[Wed Sep 22 15:26:33.539239 2021] [mpm_prefork:notice] [pid 16710] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Wed Sep 22 15:26:33.539304 2021] [core:notice] [pid 16710] AH00094: Command line: '/usr/sbin/apache2'
Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
You don't need to modify the .htaccess file I just wanted to make sure that it was in your www directory. There is something not right about your server configuration, and I can't figure it out from here. I suggest you first try installing Anahita on your local machine using MAMP or WAMP so you have a place to tweak around and experiment, before building a staging in the cloud. Also do try Nginx instead of Apache and see if it works for you.
Pete Jones
September 22 2021 Permalink
I found that the configration .php is not set so I will try that.

It generates all of the tables. it is just the web server not loading any pages. I also noticed that the /console/config.php doesnt havr the email and db settings set.
Rastin Mehr liked this
Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
How did it create the database tables without configuration.php being set?
Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
Edit configuration.php and make sure all the variables are set correctly. This file can guide you https://github.com/anahitasocial/anahita/blob/master/vendor/anahita-platform/configuration.php-dist
Pete Jones liked this
Pete Jones
September 22 2021 Permalink
The init scripts for db host user password etc but not is prompted for email server so the db is created. I noticed a thread that mentions that without the email server the login page won’t function
Pete Jones
September 22 2021 Permalink
Looking at the configuration.php-dist I see all email params commented out. Hence they will be promoted when running the site:init correct?
Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
Where are they commented out? Can you show me the line?
Rastin Mehr
Rastin Mehr
September 22 2021 Permalink
For Mail, I recommend a reliable external Mail service such as Mailgun. Anahita sends out a lot of email notifications.
Pete Jones
September 23 2021 Permalink
Hi Rastin, not worried about email. i use AWS SES that is enterprise grade emai. I am still perplexed as to what i am getting 404 error for any routes after the index page.

ubuntu@ip-172-26-5-190:/var/log$ tail apache2/error.log
[Thu Sep 23 02:30:13.080589 2021] [core:error] [pid 17089] [client 203.159.80.44:60244] AH00037: Symbolic link not allowed or link target not accessible: /var/www/anahita.drmelshealth.com
[Thu Sep 23 02:35:13.199516 2021] [core:error] [pid 17092] [client 192.241.221.234:43528] AH00037: Symbolic link not allowed or link target not accessible: /var/www/anahita.drmelshealth.com
[Thu Sep 23 02:36:11.047334 2021] [core:error] [pid 17387] [client 209.141.62.185:56202] AH00037: Symbolic link not allowed or link target not accessible: /var/www/anahita.drmelshealth.com
[Thu Sep 23 04:04:01.751952 2021] [php7:warn] [pid 17092] [client 209.17.96.50:49752] PHP Warning: require_once(/home/ubuntu/anahita/src/includes/framework.php): failed to open stream: No such file or directory in /home/ubuntu/anahita/vendor/anahita/anahita/src/includes/bootstrap.php on line 16
[Thu Sep 23 04:04:01.751987 2021] [php7:error] [pid 17092] [client 209.17.96.50:49752] PHP Fatal error: require_once(): Failed opening required '/home/ubuntu/anahita/src/includes/framework.php' (include_path='.:/usr/share/php') in /home/ubuntu/anahita/vendor/anahita/anahita/src/includes/bootstrap.php on line 16
[Thu Sep 23 04:11:44.328902 2021] [mpm_prefork:notice] [pid 17081] AH00169: caught SIGTERM, shutting down
[Thu Sep 23 04:12:54.305258 2021] [mpm_prefork:notice] [pid 884] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Sep 23 04:12:54.307623 2021] [core:notice] [pid 884] AH00094: Command line: '/usr/sbin/apache2'
[Thu Sep 23 04:20:11.681241 2021] [php7:warn] [pid 1279] [client 196.65.238.157:49769] PHP Warning: file_put_contents(/home/ubuntu/anahita/www/media/lib_anahita/js/production/site.uncompressed.js): failed to open stream: Permission denied in /home/ubuntu/anahita/vendor/anahita/anahita/src/libraries/default/base/template/helper/javascript/file.php on line 116
[Thu Sep 23 04:20:11.681942 2021] [php7:warn] [pid 1279] [client 196.65.238.157:49769] PHP Warning: file_put_contents(/home/ubuntu/anahita/www/cache/site.js.54c481adb38c63c5f70cf7df48eb558a): failed to open stream: Permission denied in /home/ubuntu/anahita/vendor/anahita/anahita/src/libraries/default/base/template/helper/javascript/file.php on line 119
ubuntu@ip-172-26-5-190:/var/log$

Powered by Anahita