0

I'm trying to serve up a directory listing via http(80) while running Foreman. I've attempted to edit the 05-foreman.conf and 15-default.conf files in /etc/httpd/conf.d in order to allow directory listings via the /usr/share/foreman/public directory, but every time I visit the page, I get "The page you are looking for doesn't exist" message from Foreman/Passenger. The directory I'm trying to hit is a symlink like this:

/usr/share/foreman/public/directory => /var/www/html/directory

I CAN get to static text files deep in the directory I'm attempting to reach, but I can't see the Indexes. I've sent FollowSymLinks and Indexes in the area, but it's not doing me any good.

<Directory "/usr/share/foreman/public">
   Options FollowSymLinks Indexes 
   AllowOverride None 
   Order allow,deny
   Allow from all
</Directory>

Am I missing something, or another file I should edit?

2 Answers 2

0

I think you are missing apache alias directive

Alias /foreman /usr/share/foreman/public
<Directory "/usr/share/foreman/public">
   Options FollowSymLinks Indexes 
   AllowOverride None 
   Order allow,deny
   Allow from all
</Directory>

After that reload apache service or restart it or if you are running foreman with passenger, you need to have something like this

Listen 443
<VirtualHost *:443>
  ServerName foreman.foo.bar
  ServerAlias foreman
  DocumentRoot /usr/local/share/foreman/public
  PassengerAppRoot /usr/local/share/foreman

  SSLEngine On
  SSLVerifyClient optional
  SSLOptions +StdEnvVars
  SSLVerifyDepth 3

  SSLCertificateFile  /etc/pki/foreman/foreman.foo.bar.cert
  SSLCertificateKeyFile  /etc/pki/foreman/foreman.foo.bar.key
  SSLCACertificateFile  /var/puppet/ssl/ca/ca_crt.pem

  <Directory /usr/local/share/foreman/public>
  Options FollowSymLinks
  DirectoryIndex index.html
  AllowOverride None
  Order allow,deny
  allow from all
  </Directory>

</VirtualHost>
1
  • Tried that and it doesn't like it worked. I did find a solution though! Posting the answer shortly.
    – SteveHNH
    Jul 24, 2015 at 14:24
0

After fighting with this for a while, I finally just moved /etc/httpd/conf.d/05-foreman.conf to /etc/httpd/conf.d/05-foreman.conf-noload to keep the httpd service from even starting foreman on port 80.

I access the webapp via 443 all the time anyway. Nothing appears broken. This appears to give back directory listings to port 80 so I can actually use the structure I put under there.

Maybe not optimal, but this gets me where I need to be. Thanks!!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .