Page 1 of 1

Can't deploy Mayan properly over Apache

Posted: Fri Aug 28, 2020 2:05 pm
by facu8990
Hi, i'm really new to Mayan EDMS, and i loved it since first use.

I've been able to make it work following the "Direct installation" guide on Ubuntu 18.04. I can acces Mayan through the IP of my VPS, but im not being able to get my apache configuration work.

My file structure is the same as shown in Mayan Documentationt.
This is my "mayan.conf" file for Apache Virtual Host

Code: Select all

<VirtualHost *:80>
	ServerAdmin admin@mayan.localhost
	ServerName mayan.localhost
	ServerAlias www.mayan.localhost
	DocumentRoot /opt/mayan-edms/
	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	Alias /static /opt/mayan-edms/lib/python3.6/site-packages/mayan/media/static
	<Directory /opt/mayan-edms/lib/python3.6/site-packages/mayan/media/static>
		Require all granted
	</Directory>

	Alias /media /opt/mayan-edms/lib/python3.6/site-packages/mayan/media
	<Directory /opt/mayan-edms/lib/python3.6/site-packages/mayan/media>
		Require all granted
	</Directory>

	<Directory /opt/mayan-edms/lib/python3.6/site-packages/mayan>
		<Files wsgi.py>
			Require all granted
		</Files>
	</Directory>

	WSGIDaemonProcess mayan python-path=/opt/mayan-edms python-home=/opt/mayan-edms
	WSGIProcessGroup mayan
	WSGIScriptAlias / /opt/mayan-edms/lib/python3.6/site-packages/mayan/wsgi.py
</VirtualHost>
Result from:
sudo tail -f /var/log/apache2/error.log

Code: Select all

[Fri Aug 28 13:18:46.035190 2020] [wsgi:error] [pid 1103]   message=force_text(MESSAGE_SQLITE_WARNING)
[Fri Aug 28 13:18:47.837136 2020] [wsgi:error] [pid 1122] /opt/mayan-edms/lib/python3.6/site-packages/mayan/apps/common/apps.py:143: DatabaseWarning: Your database backend is set to use SQLite. SQLite should only be used for development and testing, not for production.
[Fri Aug 28 13:18:47.837173 2020] [wsgi:error] [pid 1122]   message=force_text(MESSAGE_SQLITE_WARNING)
[Fri Aug 28 13:18:49.442337 2020] [wsgi:error] [pid 1138] /opt/mayan-edms/lib/python3.6/site-packages/mayan/apps/common/apps.py:143: DatabaseWarning: Your database backend is set to use SQLite. SQLite should only be used for development and testing, not for production.
[Fri Aug 28 13:18:49.442375 2020] [wsgi:error] [pid 1138]   message=force_text(MESSAGE_SQLITE_WARNING)
[Fri Aug 28 14:25:14.795707 2020] [mpm_prefork:notice] [pid 1101] AH00169: caught SIGTERM, shutting down
[Fri Aug 28 14:25:14.874708 2020] [mpm_prefork:notice] [pid 9775] AH00163: Apache/2.4.29 (Ubuntu) mod_wsgi/4.5.17 Python/3.6 configured -- resuming normal operations
[Fri Aug 28 14:25:14.874768 2020] [core:notice] [pid 9775] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 28 14:25:46.486420 2020] [wsgi:error] [pid 9777] /opt/mayan-edms/lib/python3.6/site-packages/mayan/apps/common/apps.py:143: DatabaseWarning: Your database backend is set to use SQLite. SQLite should only be used for development and testing, not for production.
[Fri Aug 28 14:25:46.486470 2020] [wsgi:error] [pid 9777]   message=force_text(MESSAGE_SQLITE_WARNING)



Could someone guide me to trouble shoot this?

Re: Can't deploy Mayan properly over Apache

Posted: Thu Sep 10, 2020 6:29 am
by michael
You need to pass the database, results storage and broker setting as environment variables. Also this will only launch the frontend part of the stack you still need to find a way to launch the workers processes.

Finally be aware that there is an issue with Apache on Python 3.8 if you upgrade (https://gitlab.com/mayan-edms/mayan-edms/-/issues/845). This is a change made in Python and cannot be fixed or workaround by Mayan.