Skip to content

SameAs Configuration

joetm edited this page Mar 7, 2016 · 10 revisions

Get sameAs Lite source code

sameAs Lite source code is hosted on GitHub.

Get source code:

$ cd /var/www/html
$ git clone https://github.com/seme4/sameas-lite
$ cd sameas-lite

sameAs Lite assumes Composer is installed in /usr/bin/composer.phar. If you have installed Composer in another directory, then edit Makefile and update the value of C:

C=/usr/bin/composer.phar

Install the required third-party libraries

$ make install

To include the development libraries, use

$ make install-dev

See the included Makefile for all available options.


Configure htaccess authentication

htaccess is an Apache component for text file-based authentication of directory and file access. It is used to restrict access to sameAs Lite files.

Add youself as a user to auth.htpasswd:

$ htpasswd auth.htpasswd YOU
New password: PASSWORD
Re-type new password: PASSWORD

Edit .htaccess and add the line

AuthUserFile /var/www/html/sameas-lite/auth.htpasswd

or equivalent for your installation path.

Allow Apache to read these files:

$ chmod 0644 .htaccess auth.htpasswd

Enable Apache to use .htaccess and some other configuration options

Ubuntu 14.04

Edit /etc/apache2/sites-enabled/000-default.conf and add under:

DocumentRoot /var/www/html

the following:

AllowEncodedSlashes On
<Directory "/var/www/html">
  AllowOverride All
</Directory>

Enable rewriting, which is disabled by default in Apache 2 under Ubuntu:

$ a2enmod rewrite

Restart Apache:

$ service apache2 restart

Scientific Linux 7 / Fedora 21

Edit /etc/httpd/conf/httpd.conf and, within:

AllowEncodedSlashes On
<Directory "/var/www/html">
  AllowOverride All
</Directory>

Change:

  AllowOverride None

to:

  AllowOverride All

Restart Apache:

$ systemctl restart httpd.service

Troubleshooting - Could not open password file

If /var/log/apache2/error.log shows:

[Thu Mar 19 09:24:28.947228 2015] [authn_file:error] [pid 20993]
(2)No such file or directory: [client 127.0.0.1:59950] AH01620: Could
not open password file: /etc/apache2/auth.htpasswd

Then it may be that you did not:

  • Set the .htaccess and auth.htpasswd file permissions
  • Update .htaccess to specify the absolute path to auth.htpasswd

Check sameAs Lite is available

Visit http://127.0.0.1/sameas-lite/. You should see the sameAs Lite user interface.

Visit http://127.0.0.1/sameas-lite/config.ttl:

  • You should be prompted for user name and password then redirected to index.php.
  • If not then clear your browser cache and try again.

  1. SameAs-Lite
  2. Concepts
  3. Server Requirements
    1. Requirements
    2. Dependency Installation
  4. Installation & Configuration
    1. Environment Configuration
    2. SameAs Configuration
    3. Sample Data
  5. [Data Stores](Data Stores)
  6. Usage
    1. Web Usage
    2. API
    3. [API Examples](API Examples)
    4. Scripting
  7. Contributing to SameAs-Lite
    1. [Setting up a development environment](Setting up a development environment)
    2. [Coding Standards](Coding Standards)
    3. [Day-to-Day Development](Day-to-Day Development)
  8. [Open Source Governance](Open Source Governance)
  9. Support
  10. [Getting In Touch](Getting In Touch)
  11. [Legal Information](Legal Information)

Clone this wiki locally