I've recently deployed a web application to my Linux Redhat server using Capistrano which creates the following directory structure in the site's document root:
/var/www/html/example.com/releases/*
/var/www/html/example.com/current
In order to load the current directory on page load, I changed my httpd.conf so that example.com's DirectoryRoot was set to /var/www/html/example.com/current
. The problem is that I want certain directories to be available for browsing which are outside the 'current' directory (phpMyAdmin and Bugzilla). I've tried touch
ing a .htaccess file to /var/www/html/example.com
but nothing is created...
What do I need to do in order to access directories which are located outside my DocumentRoot? Should I change the DocumentRoot and use .htaccess to forward the web browser to my current directory, or is there a better approach?
Also, as an unimportant side issue: is it wise to use a specific port for certain services? When I used cPanel, they used :2082 and WHM used :2086. Could I do a similar thing on my server to make the services (phpMyAdmin and Bugzilla) a little more hidden?
You are going to want to use an Alias to give access to directories outside you current DocumentRoot.
Apache's config is actually pretty well self-docuemnting. You can use the alias for
/icons/
as an example:You could, but that's just security through obscurity you best bet is to serve them over SSL and require a username/password combination.