Pub folder and http missing

On a new install of a foreman 3.4.1 server I’m trying to setup Ubuntu 22.04 operating system media following Provisioning Hosts

The problem is that I can’t browse to /pub directory on my foreman server as mentioned in the documentation. I don’t see any /pub being served by the web server.

Expected outcome:

I would expect to be able to browse to

Foreman and Proxy versions:

Foreman 3.4.1. I have no separate
Smart proxy server. Just one foreman server.

Foreman and Proxy plugin versions:

Distribution and version:

Alamalinux 8.7

Other relevant data:

Sorry, but it’s unclear to me what you have exactly: what is on URI /pub/ ? What is in /var/www/html/pub/?

$ curl
$ ls -la /var/www/html/pub/

On the linux server if I put the Ubuntu 22.04 files in /var/www/html/pub/ and then browse to http://foreman-el8.localdomain:80/pub/installation_media/ubuntu/22.04-x86_64.iso I get 404 not found.

If I move the /var/www/html/pub folder to /usr/share/foreman/public/pub and then browse to http://foreman-el8.localdomain:80/pub/installation_media/ubuntu/22.04-x86_64.iso I can download the file no problem.

So it seems like the document root is incorrectly documented as being in /var/www/html/ it should be /usr/share/foreman/?

Before, you have used, 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

<Location /pub>
  <IfModule mod_passenger.c>
    PassengerEnabled off
  Options +FollowSymLinks +Indexes
  Require all granted

Thanks @gvde . I just checked. The pub alias does not appear to be created in /etc/httpd/conf.d/05-foreman.conf

The only option I added was TFTP for the installation. Like this:

–foreman-proxy-tftp true

Unfortunately this forum only seems to let me edit my posts once, so I was not able to go back and clarify the URLs. http://foreman-el8.localdomain is my actual DNS name that I’m using for testing.

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 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)

Ok. Thanks for explaining @areyus ! Yes. I don’t have that plug-in or Katello so that explains it.