Modules > Manage Modules = 500 error

First, congrats getting to current version. Sometimes not an easy feat.:slight_smile:
This issue befuddles me a bit unless apache has suddenly decided to be a jerk if mod rewrite is not installed or turned on!
You’ll need it anyway so mission one is to check that out…

Retest this now you’re on patch 2 and mod rewrite is enabled…

ran “sudo a2enmod rewrite” and now get permissions error (403)

1 Like

Getting broken Symlink errors in apache error log;

‘’’[Thu Apr 30 15:30:16.540590 2020] [rewrite:error] [pid 6338] [client 192.168.1.125:57116] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/html/openemr/interface/modules/zend_modules/public/Installer, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=RXk9wDgWGwKfyxmj3Py0DWV2VVBNzURoHKxHn5yl
[Thu Apr 30 15:46:20.635487 2020] [rewrite:error] [pid 3052] [client 192.168.1.125:57507] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/html/openemr/interface/modules/zend_modules/public/Installer, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=RXk9wDgWGwKfyxmj3Py0DWV2VVBNzURoHKxHn5yl
[Thu Apr 30 15:58:28.502671 2020] [rewrite:error] [pid 19854] [client 192.168.1.125:57800] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : /var/www/html/openemr/interface/modules/zend_modules/public/Installer, referer: https://192.168.1.133/openemr/interface/main/tabs/main.php?token_main=Kc4JaSveFbMK5wuqUl8QOnlhejbTMgU08OgeBGyG’’’

Or rather, symlink options are not turned on. Hmm

Oh right!
I’d expect a 404 for permissions. Acts more like though mod is enabled, server doesn’t know about it!

Ensure you have directive RewriteEngine On in your port 443 vhost. Also while there ensure you’ve set up your directories for security. Refer to install doc if need to.

Apache and PHP need to get their stuff together!:slight_smile:

Ok, after editing the virtual host for openemr.
Adding;
Options FollowSymLinks
Options SymLinksIfOwnerMatch
and
RewriteEngine on
I am now getting a 404 error going to “Manage Modules”.

Here are the contents of the /etc/apache2/sites-available/openemr.conf file.

‘’’<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName openemr
<Directory “/var/www/html/openemr”>
Options FollowSymLinks
Options SymLinksIfOwnerMatch
AllowOverride none
allow from all
Require all granted

RewriteEngine on
SSLEngine on
SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
SSLCertificateFile /etc/ssl/certs/Server.crt
SSLCertificateKeyFile /etc/ssl/private/Server.key
SSLCACertificateFile /usr/local/share/ca-certificates/CertificateAuthority.crt
SSLVerifyClient optional
‘’’

apache2 error log is now clean. -no errors. so at least I’m making progress, any other ideas?

Yep, lets go Tarpon/Snook fishing!

Really shouldn’t need above(I don’t think!) unless needed elsewhere. If so place under your document root directory or directory where needed.

Lastly, if all above doesn’t work try
AllowOverride FileInfo Options=All
# or AllowOverride All
Require all granted

You da’ man Jerry;

AllowOverride FileInfo Options=All was the ticket!

This is going into my “How to” Instructions for converting 4.x.x to 5.0.2

This would be very well received by the community if you choose to share.

Sooo, grab your rod and reel, fly rod or cane pole(if that floats your boat) and meet me at the boat ramp!:slight_smile:

Glad you’re up and running. Stay safe…

Documentation is always a good thing.

This reminds me, weren’t we supposed to discuss the topic of fishing at one of the Saturday conference calls :slight_smile:

Hello David,

This worked for me:

sudo a2enmod rewrite

Thanks.

@brady.miller @sjpadgett @LMoonsammy @hitechelp

I did all recommendations to resolve the issue with module link , but is not working for me.
And also I cant find openemr.conf file in the /etc/apache2/sites-available/openemr.conf file.
File not exist.

Try to edit default-ssl.conf. I believe this is the configuration you are using especially if you don’t have any other websites in your server/computer.

@BenCan Thank you for your recommendation
I actually don’t have openemr.conf file, were I suppose to make configurations.
And in the default-ssl.conf, there no anything about oppen emr configurations. What kind of configurations I need to make in default-ssl.conf to activate module tub.

You have to know where you ‘placed’ the app files. I’m guessing it is installed in the directory /var/www/html.

Consequently this is the DocumentRoot found in the default-ssl.conf file. So by default, you can create a
<directory /var/www/htm> #this is where you will place apache directives specifice to this directory AllowOverride FileInfo Options=All </directory> within the <VirtualHost></VirtualHost>.

See Enable the Apache .htaccess File section in this link.

Thank you for your recommendation, and sorry for late replay. I just confused what to do, because I’m not good in coding.
Do I need to add code you provided to default-ssl.conf file

<directory /var/www/htm> #this is where you will place apache directives specifice to this directory AllowOverride FileInfo Options=All </directory> within the <VirtualHost></VirtualHost>.

@ncavalier

Yes, you do. You can check this link to see how it should look like.

See section Enable the Apache .htaccess File specifically.

Hope this helps.

I just got cloned openemr.conf file from my tested computer from v5.0.1
Please check if any configuration needed, because my modules still not working.

openemr.conf (1.0 KB)