Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rdmorganiser/rdmo-docs-en
Browse files Browse the repository at this point in the history
  • Loading branch information
triole committed Aug 13, 2020
2 parents 730019f + 18c08c7 commit 9906b4c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/deployment/apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ for CentOS 7 in `/etc/httpd/conf.d/vhosts.conf` use:

Restart the Apache server: `sudo service apache2 restart`. RDMO should now be available on `YOURDOMAIN`. Note that the Apache user needs to have access to `/srv/rdmo/rdmo-app/static_root/`.

For distributions that use SELinux (e.g. CentOS, RHEL, Fedora), run also the following commands, then restart Apache:
```bash
sudo semanage fcontext -a -t httpd_sys_content_t "/srv/rdmo/rdmo-app(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/srv/rdmo/rdmo-app/static_root/CACHE(/.*)?"
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/srv/rdmo/rdmo-app/log(/.*)?"
sudo semanage fcontext -a -t httpd_sys_script_exec_t -f f "/srv/rdmo/rdmo-app/env(/.*)?/.+\.so(\.[^/]*)*"
sudo restorecon -R -v /srv/rdmo
sudo setsebool -P httpd_can_network_connect=1
# Run this only if using memcached
sudo setsebool -P httpd_can_network_memcache=1
```

As you can see from the virtual host configurations, the static assets such as CSS and JavaScript files are served independently from the WSGI-python script. In order to do so, they need to be gathered in the `static_root` directory. This can be achieved by running:

```bash
Expand Down

0 comments on commit 9906b4c

Please sign in to comment.