Reputation: 3
I am new to Apache server and would appreciate any help from you guys regards to VirtaulHost.
Context: I am setting up a CA/Web Server on CentOS 5.8 with Apache Server and I would like to have a public accessibility to my CRL
Network Configurations: eth0 - Private Interface: 10.10.10.2, eth1 - Public Interface: 199.200.201.202 (fake one of course :P)
Current Configuration in "httpd.conf":
<VirtualHost 10.10.10.2:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
ErrorLog logs/CA-Test.abc.net
CustomLog logs/CA_Custom_logs common
</VirtualHost>
<Directory />
Order allow, deny
Allow from all
AllowOverride all
</Directory>
URL for CRL Location: "CA-Test.abc.net\ca\crl\root.crl"
Question\Problem: I would like to allow public access to the "\ca\crl" directory only, but not the contents under parent directories "\ca"
Should my VirtualHost Configuration to be:
<VirtualHost 199.200.201.202:80>
ServerAdmin [email protected]
DocumentRoot /ca/crl/root.crl
ErrorLog logs/CA-Test.abc.net
CustomLog logs/CA_Custom_logs common
</VirtualHost>
If not, What should the correct DocumentRoot to be in this case? (/var/www/html/ca/crl/root.crl??) How should I configure it correctly to allow external access to the correct URL of CRL location?
Thank you for your time and help.. :)
Upvotes: 0
Views: 593
Reputation: 2050
try adding these to your httpd.conf
<VirtualHost IP:80>
DocumentRoot /fullpath/to/ca/crl/
ServerName CA-Test.abc.net
</VirtualHost>
Now restart your httpd and try browsing the url
Now public can't access the contents in the folder "ca". Let us know if that helped you.
Upvotes: 0