Tweet
Bookmark this on Delicious
The AllowOverride directive will enable you to control to which extent the directives set in the .htaccess files (of each directory of your web server tree) can override the directives set in your general Apache configuration file httpd.conf. Please note that this option may slow down your Apache server since Apache needs to look for an .htaccess file in every directory before handling the requests. Much like the Options directive, the AllowOverride directive can be placed within the Directory tags of the related directory. For a full list of all options available with the AllowOverride directive, you can have a look at the standard Apache server documentation. Generally speaking, I recommend you to simply turn this feature off, unless you really need it and know what you are doing; in order to turn off AllowOverride, add the following in between the general Directory tags above:
AllowOverride None
Next tutorial: Installing an Apache server on Linux - Apache server limits
Back to computer forums
Apache server configuration on Linux - Apache AllowOverride directive
The AllowOverride directive will enable you to control to which extent the directives set in the .htaccess files (of each directory of your web server tree) can override the directives set in your general Apache configuration file httpd.conf. Please note that this option may slow down your Apache server since Apache needs to look for an .htaccess file in every directory before handling the requests. Much like the Options directive, the AllowOverride directive can be placed within the Directory tags of the related directory. For a full list of all options available with the AllowOverride directive, you can have a look at the standard Apache server documentation. Generally speaking, I recommend you to simply turn this feature off, unless you really need it and know what you are doing; in order to turn off AllowOverride, add the following in between the general Directory tags above:
AllowOverride None
Apache server configuration on Linux - Apache core module directives - General server configuration
- ServerName directive: this directive identifies the server: its hostname and port.
-
ServerRoot directive: the ServerRoot directive gives the path to your Apache server; typically, this directive will be set as follows:
ServerRoot /path/to/apache
(the path can also be put between quotes) Needless to say, your server can't function without this directive set properly. Do not add the trailing slash after the folder name -
DocumentRoot directive: identifies the path to the folder containing your web documents (public folder). Said differently, this gives the path to the directory containing index.html (or index.php ...). Usually, that folder is named htdocs (it can be www or public-html, depending on the Apache bundle you are using).
DocumentRoot /path/to/htdocs
-
Listen directive: indicates which port the server will be listening to, typically port 80 for http traffic.
Listen 80
-
HostnameLookups directive: this directive will enable/disable DNS lookups (on/off). There's also a possibility of performing a double-reverse DNS lookup (Double): this means that once a DNS lookup has been performed, the resolved host name IP (or IPs) will be checked against the orinigal IP used for the DNS lookup (obviously, at least one these IPs must match the original IP; otherwise, this will mean that the resolved hostname was fake). Note that, most of the time, you will want to disable HostnameLookups because this feature can significantly slow down your server if you're receiving a high web traffic.
HostNameLookups Off -
ServerAdmin: this directive sets the email address to which the visitor is invited to write in case of a server error; note than you can turn off this directive by setting:
ServerSignature Off
Note that this directive is useful in case of a chain of proxies since it is then impossible to know exactly at which position in the chain an error occurred ... -
ServerTokens: the ServerTokens directive allows you to customize the format of the HTTP response header, i.e. you can decide how much information you want it to disclose. By default, a lot of information is provided (for instance your server version) which might be dangerous. We advise you to display only the type of the server (i.e. Apache):
ServerTokens ProductOnly
Next tutorial: Installing an Apache server on Linux - Apache server limits
Back to computer forums
