I‘ve recently started to use FreeBSD operating system with tcsh (c shell clone) shell. I noticed that both set and setenv command set shell user environment. What’s the difference between the SET and SETENV commands?
Q. I’ve installed Apache2 and mod_security21 under FreeBSD. Whenever I try to restart apach22 process I get following error:
Cannot load /usr/local/libexec/apache22/mod_security2.so into server: /usr/local/libexec/apache22/mod_security2.so
How do I fix this problem?
How do I display Apache server status such as current server activity and performance under Red Hat Enterprise Linux?
I‘d like to switch from mod_php5 to mod_fastcgi. I’m using FreeBSD 7 release along with following software:
+ Apache 2.2
+ PHP as mod_php5
+ MySQL DB 5.1.23 server
How do I configure php as FastCGI server?
Q. If there is no index.html or index.php, Apache displays all other files in a Directory. How do I force Apache web server not to display my directory / folder list?
A.This controlled by a module called mod_autoindex or mod_dir.
You can completely remove (or replace) automatic index generation as per your requirements. The IndexIgnore directive adds to the list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename. Multiple IndexIgnore directives add to the list, rather than the replacing the list of ignored files. By default, the list contains . (the current directory). Open your httpd.conf or .htaccess file and append following directive to block auto indexing for all pdf and mp3 files:
IndexIgnore *.pdf *.mp3
To enforce or deny complete folder listing, use *:
Save and close the file. Restart httpd if httpd.conf was updated:
# service httpd restart
=> Apache mod_autoindex help pages.
Q. How do I hide the Apache version number under CentOS Linux 5 server?
A. You can easily hide Apche (httpd) version number and other information. There are two config directives that controls Apache version. The ServerSignature directive adds a line containing the Apache HTTP Server server version and the ServerName to any server-generated documents, such as error messages sent back to clients. ServerSignature is set to on by default. The ServerTokens directive controls whether Server response header field which is sent back to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules. By setting this to Prod you only displays back Apache as server name and no version number displayed back.
Open your httpd.conf file using text editor such as vi:
Append/modify config directive as follows:
Save and close the file. Restart Apache web server:
# /etc/init.d/httpd restart