404 Error trying to open Manage Modules and Portla Dashboard

Situation
I changed /etc/httpd/conf/httpd.conf as recommend in this thread.

Modules mentioned in that thread are loaded.

[jbusch@openemr ~]$ sudo httpd -M | grep "headers\|rewrite"
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::5400:3ff:fe66:a528. Set the 'ServerName' directive globally to suppress this message
 headers_module (shared)
 rewrite_module (shared)

OpenEMR Version
OpenEMR 6.0.0

[jbusch@openemr ~]$ cat /etc/oracle-release
Oracle Linux Server release 8.4
[jbusch@openemr ~]$ php -v
PHP 7.4.6 (cli) (built: May 12 2020 08:09:15) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Browser:
Firefox (on Fedora Linux)

Logs

[jbusch@openemr ~]$ sudo tail -f /var/log/httpd/ssl_access_log
172.70.126.28 - - [17/Jul/2021:21:03:49 -0500] "POST /openemr/interface/main/dated_reminders/dated_reminders.php HTTP/1.1" 200 91
172.70.126.28 - - [17/Jul/2021:21:03:49 -0500] "GET /openemr/Documentation/help_files/message_center_help.php HTTP/1.1" 200 21739
172.70.126.28 - - [17/Jul/2021:21:03:51 -0500] "GET /openemr/interface/modules/zend_modules/public/Installer HTTP/1.1" 404 196
172.70.126.28 - - [17/Jul/2021:21:03:59 -0500] "GET /openemr/portal/patient/provider HTTP/1.1" 404 196

Edit: PHP Modules

[jbusch@openemr ~]$ php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
imagick
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

Updated to 6.0.0 Patch 2. There was no change in the issue.

hi @JaredBusch, can you try setting up a virtual host for openemr? Here’s an apache2 6.0.0 example from the docker. Then follow setup instructions which should match the docker example:

I had that originally @stephenwaite. I believe it was in the original installation guide?

I removed it (renamed) when I made changes in the prior post. I can put it back.

This is how I installed. I wrote this guide for future reference as I did the install.

I didn’t document the where I got the vhost file from. So I need to look back at command history to see what I did. But it was there.

here is the file that was not working.

<VirtualHost *:80>
   DocumentRoot /var/www/html/openemr/
   ServerName emr.domain.com
   DirectoryIndex index.htm index.html index.php
   ServerAlias example.com
   ErrorDocument 404 /story.php
   ErrorLog /var/log/httpd/emd.domain.com_error_log
   CustomLog /var/log/httpd/emr.domain.com_access_log combined

  <Directory "/var/www/html/openemr">
      AllowOverride FileInfo
      Require all granted
  </Directory>
  <Directory "/var/www/html/openemr/sites">
      AllowOverride None
  </Directory>
  <Directory "/var/www/html/openemr/sites/*/documents">
      Require all denied
  </Directory>
</VirtualHost>

So I reverted the change to httpd.conf and created a new vhost file based on that link in the post, which is more detailed than whatever I originally found following the guide, and now it is all working.
Thanks @stephenwaite
Here is a vaild conf file for someone running in the RHEL ecosystem.

[jbusch@openemr ~]# cat /etc/httpd/conf.d/openemr.conf
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule allowmethods_module modules/mod_allowmethods.so

## Security Options
# Strong HTTP Protocol
HTTPProtocolOptions Strict
Protocols http/1.1
# Don't Reveal Server
ServerSignature off
ServerTokens Prod
Header unset Server
# No ETag
FileETag None
Header unset ETag
# Set HSTS and X-XSS protection
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
Header set X-XSS-Protection "1; mode=block"
# Narrow document root
DocumentRoot /var/www/html/openemr
ErrorLog /var/log/httpd/emr.domain.com_error_log
CustomLog /var/log/httpd/emr.domain.com_access_log combined


<Directory /var/www/html/openemr>
    # Only allow these HTTP Methods
    AllowMethods GET POST PUT DELETE HEAD OPTIONS
    # No indexes anywhere
    Options -Indexes
    AllowOverride FileInfo
    Require all granted
</Directory>

<Directory "/var/www/html/openemr/sites">
    AllowOverride None
</Directory>

<Directory "/var/www/html/openemr/sites/*/documents">
    Require all denied
</Directory>

#######################################
### Uncomment the following 3 lines ###
### with #'s below to enable HTTPS  ###
### redirection & require HTTPS only ##
#######################################
<VirtualHost *:80>
    #RewriteEngine On
    #RewriteCond %{HTTPS} off
    #RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]
</VirtualHost>

<VirtualHost _default_:443>
    #   SSL Engine Switch:
    #   Enable/Disable SSL for this virtual host.
    SSLEngine on
    SSLHonorCipherOrder on
    #   Used following tool to produce below ciphers: https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=apache-2.4.39&openssl=1.1.1&hsts=yes&profile=modern
    SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
    SSLProtocol -ALL +TLSv1.2
    SSLCertificateFile    /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
</VirtualHost>
2 Likes

After adding the

  <Directory "/var/www/html/openemr">
      AllowOverride FileInfo
      Require all granted
  </Directory>
  <Directory "/var/www/html/openemr/sites">
      AllowOverride None
  </Directory>
  <Directory "/var/www/html/openemr/sites/*/documents">
      Require all denied
  </Directory>
</VirtualHost>

to the sites-available/openemr.conf file, this resolved the issue.