- I am new to Apache Server Configuration.
- I went through the Apache Documentation and tried to understand the Basics as well as the Directives.
- But still, I am not able to figure out a configuration that I require for my current scenario.
- The Version of my Apache Server is 2.4.6 running on Cent OS 7.5.
My Current "httpd.conf" file. (Contains Only the important bits)
ServerRoot "/etc/httpd"
Listen 80
ServerAdmin root@localhost
ServerName 127.0.0.1
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Location />
AuthType shibboleth
ShibRequireSession On
Require valid-user
</Location>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/mywebsitecontent/"
ServerName myweb
</VirtualHost>
Problem:
- According to the above configuration, typing "http://myweb/" in the browser URL will invoke Shibboleth Authentication as configured in
<Location>
directive. - But at the same time, if I host any other website in the
"/var/www/html/"
folder for example say"demo"
website. - Now if try to access the
demo
website with http://127.0.0.1/demo/index.html, it will also invoke Shibboleth Authentication because of<Location />
configuration. And I don't want that. - I want the
<Location>
to only work for"/var/www/html/myweb/"
.
What I Tried:
<Location /myweb>
- Not Working- Nesting
<Location>
in<VirtualHost>
- Not Working
- I don't know what I am doing wrong.
- Any idea/suggestion/solution/right direction will be greatly appreciated.