Options -Indexes
in httpd.conf, but this would block all indexing. I was wondering if this can be an issue when set globally.ASKER
# ============= APACHE2 SERVER CONFIGURATION FILE ============
#
# For all web sites on this system
#
# ============= APACHE2 SERVER CONFIGURATION FILE ============
# ========================================================
#
# APACHE GLOBAL ENVIRONMENT
#
# ========================================================
# Group, User: Group/user to run as after switching from root.
User httpd
Group httpd
# ServerRoot: The top of the directory tree under which the
# server's configuration, error, and log files are kept.
ServerRoot "/usr/local/apache2"
# PidFile: Where the process ID number is stored when starting.
PidFile /var/log/apache/httpd.pid
# Listen: Bind Apache to specific IP addresses and/or ports.
# See also the <VirtualHost> # directive.
Listen 80
# StartServers: Number of child/servers to start with
StartServers 1
# ========================================================
#
# DEFAULT/"MAIN" SERVER DIRECTIVES
#
# ========================================================
#
# Where server problems should be emailed.
#
ServerAdmin root@127.0.0.1
#
# The default hostname sent back to clients.
#
ServerName localhost
#
# The default document base directory.
#
DocumentRoot /www/localhost
#
# System root directory: Deny all access
#
<Directory />
Options +FollowSymLinks -Indexes
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
# CoreDumpDirectory: Where to write core dump in case of a crash
#
CoreDumpDirectory log
#
# Log the sitenames of clients or just IP addresses
#
HostnameLookups Off
#
# Append server info to internally generated pages
#
ServerSignature Off
# ========================================================
#
# DEFAULT VIRTUAL HOST
#
# ========================================================
#
# IP address[:port] for name-based virtual hosts
#
NameVirtualHost *:80
#
# This "Virtual"Host is used for IP-addressed requests, i.e., no server name.
#
<VirtualHost *:80>
#
# Set default root and access allowed
#
DocumentRoot /www/localhost
<Directory /www/localhost>
Order allow,deny
Allow from all
Options none
AllowOverride none
</Directory>
#
# Configure error logging
#
CustomLog /dev/null locallog
# Redirect everything to a blocking page
RewriteEngine On
RewriteLogLevel 0
RewriteCond %{REQUEST_URI} !NoWai\.jpg$ [NC]
RewriteCond %{REQUEST_URI} !standard\.html$ [NC]
RewriteRule .* /standard.html [L]
</VirtualHost>
# ========================================================
#
# VIRTUAL HOST INCLUDES
#
# ========================================================
#
# 1: website1.com
#
Include conf/website1.conf
#
# 2: website2.biz
#
Include conf/website2.conf
# ====================== VIRTUAL HOST ======================
#
# www.website1.com
#
# ====================== VIRTUAL HOST ======================
#
# VirtualHost begin: Define a new virtual host
#
<VirtualHost *:80>
#
# ServerName: The primary name for this virtual host
# ServerAlias: Other acceptable names for this virtual host
# UseCanonicalName: Use ServerName to build URLs referring to itself
#
ServerName www.website1.com
ServerAlias website1.com
UseCanonicalName on
#
# DocumentRoot: This server's base directory.
#
DocumentRoot /www/ws1
#
# This server's base directory: Permit all access
#
<Directory /www/ws1>
Order deny,allow
Allow from all
Options +FollowSymLinks -Indexes
AllowOverride none
</Directory>
#
# Security stuff
#
# Remove the ETAG from all response headers
Header unset ETag
FileETag None
# Add the X-ROBOTS-TAG to all response headers
Header set x-robots-tag "noarchive,noimageindex,noodp"
# Add the X-XSS-PROTETCION tag to all response headers
Header set X-XSS-Protection "1; mode=block"
# Disable framing our site from any other site
Header set X-Frame-Options SAMEORIGIN
# Disable content from any other site
Header set Content-Security-Policy "default-src 'none'; script-src 'self'; img-src 'self'; style-src 'self';"
# Catch anything with invalid (on this site) characters
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D|\?|\+|\%|\&|=).* [NC]
RewriteRule .* - [F,L]
# Rewrite a root level URI of "/" to "/index.html"
# ... but no other URIs. Let them throw a 404.
RewriteRule ^/$ /index.html [R=301]
# Always allow access to robots.txt, no matter who or what
RewriteCond %{REQUEST_URI} robots\.txt$ [NC]
RewriteRule .* /robots\.txt [L]
#
# VirtualHost end: End of definitions for this virtual host
#
</VirtualHost>
ASKER
ASKER
<VirtualHost *:80>
ServerName <THE IP ADDRESS OF MY SERVER>
Redirect 403 /
ErrorDocument 403 "Sorry, no IP address access allowed"
DocumentRoot /var/www/html/null/
UseCanonicalName Off
UserDir disabled
</VirtualHost>
ASKER
Options -Indexes
HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.
TRUSTED BY
This is prudent considering the many bots, scrapers and script kiddies which go through entire IP blocks looking for vulnerable servers and accessing them by IP address.