Before, you have used http://foreman.example.com/pub/installation_media/ubuntu/22.04-x86_64/, now it’s http://foreman-el8.localdomain:80/pub/installation_media/ubuntu/22.04-x86_64.iso. If you change the real name, please be consistent. Otherwise it’s really hard to tell if you really mean the same or not.
Also, please answer the questions: Sorry, but it’s unclear to me what you have exactly: what is on URI /pub/ ? What is in /var/www/html/pub/?
Don’t do that. That again, makes it very hard to help, that is not what is usually expected.
Is is possible, you have installed some updates and did not run foreman-installer after that?
foreman-installer does not show any errors?
Did you use any other installation options for foreman-installer except the basic installation?
The pub alias should be created in /etc/httpd/conf.d/05-foreman.conf by foreman-installer:
Alias /pub /var/www/html/pub
Options +FollowSymLinks +Indexes
Require all granted
Have you only installed Foreman without any plugins?
The /pub directory and alias are only created by foreman-proxy-conent installer configuration, so it is only enabled on proxies with the content feature and Foreman servers with Katello.
The documentation on docs.theforeman.org is currently very Katello centric, so most of it assumes you have Katello installed. The docs for “plain Foreman” are mainly at Foreman :: Manual. In Foreman :: Manual it assumes you use upstream installation media mirrors. You can use local mirrors, but you will have take care of the mirror and the webserver yourself.
Friendly reminder: Foreman and foreman-installer don’t like people messing with the config files, so I would recommend hosting a seperate webserver on another host to serve installation media.
I’ve experienced the same mulitple times only to find out that the reason why the file placed inside /var/www/html/pub/ is not served by the webserver is selinux - can you verify the contexts of the added files? (or just set selinux to permissive mode, for a quick check)