Ok - well, I’ve managed to do this - mostly.
tldr;
-
The correct path for the “main” login-logo.svg file in 6.1 AWS Express Plus is: /var/www/localhost/htdocs/openemr/public/images
-
Make sure you refresh your browser cache every time you make a change
First - for anyone trying to do this - remember to clear images from your cache every time you change something and re-test!
It seemed like there were two ways that might work. First, under admin/system/files, the first option is to “Upload Image to /var/www/localhost/htdocs/openemr/sites/default/images” That would have been a million times easier for me… if it had worked… but the site isn’t pulling the main login logo from that directory, so…
The Hard Way:
-
Download and install WinScp.net to be able to secure FTP to Amazon EC2. I installed in “Commander Mode” which seemed intuitive. Login with
File Protocol: SFTP
Host Name: ec2-11-111-1-11.compute-1.amazonaws.com (use the instance Public IPv4 DNS from AWS)
User Name: Ubuntu
Password… I think this was the private key - ugh - not sure I can even remember.
-
Create the file that you want to upload. Make Sure it is the Right Size! And Make Sure you name it exactly correctly. Caps matter! dash versus underscore matters! Gif vs. PNG vs. SVG matters. I found a lot of conflicting information, and ultimately uploaded about 6 different versions of Login-Logo, login-logo, login_logo, etc with different file extensions. Had I checked what files were there before I tried to upload, I would have had a better idea what I had to replace.
-
Once you’ve connected and logged in, navigate to the folder with the files on the left, and go to someplace easy to get to on the right… Drag and drop the files.
-
On windows on your local machine, open a cmd window and type
ssh -i [pem file name] ubuntu@[your ip address]
where [pem file name] = your AWS Key Pair
and [your ip address] is the public IP address of your AWS instance
** If you get a “warning” UNPROTECTED PRIVATE KEY FILE message*** it is because the private key file is stored somewhere on windows with too many users able to access it. Store it someplace where only you have access. Remove inherited permissions in Windows*** Then try again
-
Type “Sudo -i” (without quotes) to get to the root.
-
Type “docker ps” which will give you the “Container ID” of the OpenEMR instance.
-
OPTIONAL: Type "docker exec -it $(docker ps | grep _openemr | cut -f 1 -d " “) /bin/sh” which gets you to the root directory inside the docker container. You can then navigate to the various folders and see what’s in them (e.g., what login_logo files exist.) When done type exit and hit enter, which gets you back to the root@ip… command prompt.
-
For each file that you want to move into the images directory:
type "docker cp [path]/[filename] [containerid]:/var/www/localhost/htdocs/openemr/sites/default/images/
where…
[path] = the path to where you saved the files when you uploaded them via winscp
[filename] = login-logo.svg or login_logo.gif… etc
[containerid] is the one that you looked up in step 6
Clear your images cache and go back to your public IP and see if it worked.
…
Note: After all the above, I learned after getting only one of my files to render that the directory paths seem to be incorrect. In 6.1 AWS Express Plus, I had to replace login-logo.svg in the following directory path: /var/www/localhost/htdocs/openemr/public/images
That did it (though I’m still struggling with some sizing / placement).