Skip to content
Sara Monzón edited this page Mar 7, 2019 · 25 revisions

Installation of Apache

Use the YUM package manager , to install the Apache web server software

yum install httpd httpd-devel

(NOTE: httpd-devel is needed for python module 'mod_wgsi')

Installation of python mod-wsgi packet

cd /srv/iSkyLIMS
source virtualenv/bin/activate
pip install mod-wsgi 
deactivate

Edit Apache configuration "httpd.conf" file:

vim /etc/httpd/conf/httpd.conf

Add the following lines at the bottom of the LoadModule block:

## Load wsgi module with library associated in virtualenv
LoadModule wsgi_module "/srv/iSkyLIMS/virtualenv/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"

Add the following lines at the end of the "httpd.conf" file:

## Django iSkyLIMS site configuration
# Socket prefix for socket file storage (permissions issues in Linux)
WSGISocketPrefix /var/run/wsgi
# Path to serve your app at and wsgi script path
WSGIScriptAlias / /srv/iSkyLIMS/iSkyLIMS/wsgi.py
# Path to virtualenv
WSGIPythonHome /srv/iSkyLIMS/virtualenv
# Ensures your project package is available for import on the Python Path.
WSGIPythonPath /srv/iSkyLIMS

# Directory piece. This ensures that apache can access wsgi.py script.
<Directory /srv/iSkyLIMS/iSkyLIMS>
        <Files wsgi.py>
                ## This lines work for Apache 2.2 version. For 2.4 this sintaxix changes.
                Satisfy Any
                Allow from all
        </Files>
</Directory>
    
# Lines for serving static files (This could be done with nginx instead of Apache)
Alias /static /srv/iSkyLIMS/static
<Directory /srv/iSkyLIMS/static>
## These lines are for Apache 2.2 version.
   Satisfy Any
   Allow from all
</Directory>
Alias /documents /srv/iSkyLIMS/documents
<Directory /srv/iSkyLIMS/documents>
   ## These lines are for Apache 2.2 version. 
   Satisfy Any
   Allow from all
</Directory>

Ubuntu Confituration

In Ubuntu you have to create two files:

First create iskilyms.load in /etc/apache2/mods-available

vim /etc/apache2/mods-available/iskylims.load

Add this lines:

LoadModule wsgi_module "/srv/iSkyLIMS/virtualenv/lib/python3.6/site-packages/mod_wsgi/server/mod_wsgi-py36.cpython-36m-x86_64-linux-gnu.so"

Create file iskylims.conf

vim /etc/apache2/mods-available/iskylims.conf

Add this lines:

# Socket prefix for socket file storage (permissions issues in Linux)
WSGISocketPrefix /var/run/wsgi
# Path to serve your app at and wsgi script path
WSGIScriptAlias / /srv/iSkyLIMS/iSkyLIMS/wsgi.py
# Path to virtualenv
WSGIPythonHome /srv/iSkyLIMS/virtualenv
# Ensures your project package is available for import on the Python Path.
WSGIPythonPath /srv/iSkyLIMS

Create needed symbolic links to enable the configurations:

ln -s /etc/apache2/mods-available/iskylims.load /etc/apache2/mods-enabled/
ln -s /etc/apache2/mods-available/iskylims.conf /etc/apache2/mods-enabled/

Build directory /srv/iSkyLIMS/static with all the required static contents

./manage.py collectstatic

Start the httpd server:

service httpd start
service apache2 start

SELINUX disabled

selinux has to be disabled in your system. check that SELINUX is disabled on /etc/selinux/conf file.

Verification Apache

After performing all configuration settings it is a nice time to check that your iSkyLIMS run correctly in your system. To check it write http://localhost in your navigator.

The iSkyLIMS homepage will be displayed. If you cannot see homepage, check the Apache log files to find out the problem.

Clone this wiki locally