0

We use shibboleth to secure an apache virtualhost. We would like to make single file (a site map) available publicly for this site.

Is there way to code this in the virtualhost?

The current virtual host looks like this:

<VirtualHost *:443>
        ServerName my-staging.sjf.edu
        DocumentRoot /var/www/sjf/my
        <Directory "/var/www/sjf/my">
                Options -Indexes +FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
        <Location />
            AuthType shibboleth
            ShibRequestSetting requireSession 1
            <RequireAny>
                Require env allowed
                require shib-session
            </RequireAny>
        </Location>
...
<VirtualHost *:443>

The file I would like to make public would ideally be in the site root, but perhaps somewhere else if necessary.

1 Answers1

0

Just add a new <Location> directive for the sitemap, and configure it with Require all granted:

<VirtualHost *:443>
        ServerName my-staging.sjf.edu
        DocumentRoot /var/www/sjf/my
        <Directory "/var/www/sjf/my">
                Options -Indexes +FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>

        <Location />
            AuthType shibboleth
            ShibRequestSetting requireSession 1
            <RequireAny>
                Require env allowed
                require shib-session
            </RequireAny>
        </Location>

        <Location /sitemap.xml>
            Require all granted
        </Location>
<VirtualHost *:443>
larsks
  • 43,623
  • 14
  • 121
  • 180