Question

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 a@aa.com
    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 a@aa.com
    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.. :)

Was it helpful?

Solution

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

http://CA-Test.abc.net/root.crl

Now public can't access the contents in the folder "ca". Let us know if that helped you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top