We, begin creating a new file in / etc/apache2/sites-availiable / (eg 'default') with the following configuration:
Code:
<VirtualHost 192.168.1.1:80>
ServerAdmin webmaster @ localhost
DocumentRoot / var / www
<Directory />
DirectoryIndex index.html
Options FollowSymLinks
AllowOverride None
<Directory / var / www>
DirectoryIndex index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
allow from all
</ Directory>
ErrorLog / var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# Alert, emerg.
LogLevel warn
CustomLog / var/log/apache2/access.log Combined
</ Virtualhost>
Create a symlink to this configuration in / etc/apache2/sites-enabled to activate the site, and a soft link rewrite module and we can restart the service:
Code:
debian: / # ln-s / etc/apache2/sites-availiable/default / etc/apache2/sites-enabled/default
debian: / # ln-s / etc/apache2/mods-availiable/rewrite.load / etc/apache2/mods-enabled/rewrite.load
debian: / # / etc/init.d/apache2 restart
Now running the server (you can try entering http:// 192.168.1.1), we must create a blank page and add a few rules for the mod-rewrite so any requested file is returned as a 0-length file:
Code:
debian: / # touch / var / www / index.html
debian: / # vi / var / www / .htaccess
Now in the file. Htaccess wrote the following, this will redirect any request to the index.html file you just created:
Code:
Options + FollowSymLinks
RewriteEngine on
RewriteRule ^ .* $ index.html [L]
There, now if we try to open any of the pages analyzed by Sarg see that returns a blank page.
Bookmarks