let us assume you want to protect a whole directory by password and but one file must be readable for public access. This can easily be done by a .htaccess file.
For example: Who want to trotect the folder /var/www/html and only the file public.html should be readable without a password.
Advertisment to support michlstechblog.info
these are the steps to protect a single file in a directoy by a password.
this post describes the steps to install a lamp stack on debian linux. This is the base for many content management systems like Joomla, WordPress or Drupal.
LAMP means linux as operating system, apache as webserver, mysql as database and PHP as script language. To install all packages login as root.
this post describes how to setup a reverse proxy for a host. All http requests to host reverseproxy.domain.org should deliver the content of www.domain.org at Port 8080.
First you have to enable the requiered modules in httpd.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
Then insert a virtual host directive:
ProxyPass / http://www.domain.org:8080/
ProxyPassReverse / http://www.domain.org:8080/
short post as reminder how to enable Server Side Includes on a virtual directory.
mod_include must be enabled. MimeType for text/html must associated with .shtml file extension. Sample config for SSI looks like these:
Options Indexes FollowSymLinks MultiViews ExecCGI Includes
Allow from all
Require all granted
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
See you Michael