image Strona Główna       image SKFAB00GBB       image ceelt smp       image Artykul1       image ArmyBeasts       image 2006 nov p3       

Odnośniki

[ Pobierz całość w formacie PDF ]

load it from
Allowed in *.conf only outside , or
Hack 81. Validate the httpd.conf after making
changes
Use option -t to validate whether there are any issues with a specific Apache
configuration file. In the example shown below, it displays that there is a
101
Linux 101 Hacks www.thegeekstuff.com
problem at line 148 in the httpd.conf.debug. mod_auth_basicso is missing a .
(period) before the so.
# httpd -t -f conf/httpd.conf.debug
httpd: Syntax error on line 148 of
/etc/httpd/conf/httpd.conf.debug:
Cannot load /etc/httpd/modules/mod_auth_basicso into
server:
/etc/httpd/modules/mod_auth_basicso: cannot open shared
object file: No such file or directory
Once you fix the issue, it will display Syntax OK.
# httpd -t -f conf/httpd.conf.debug
Syntax OK
Hack 82. Display the httpd build parameters
Use option -V (upper-case V), to display Apache version number and all the
parameters that are used while building the Apache.
# httpd  V
Server version: Apache/2.2.9 (Unix)
Server built: Jul 14 2008 15:36:56
Server s Module Magic Number: 20051115:15
Server loaded: APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with& .
-D APACHE_MPM_DIR= server/mpm/prefork
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
102
Linux 101 Hacks www.thegeekstuff.com
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT= /etc/httpd
-D SUEXEC_BIN= /usr/sbin/suexec
-D DEFAULT_PIDLOG= logs/httpd.pid
-D DEFAULT_SCOREBOARD= logs/apache_runtime_status
-D DEFAULT_LOCKFILE= logs/accept.lock
-D DEFAULT_ERRORLOG= logs/error_log
-D AP_TYPES_CONFIG_FILE= conf/mime.types
-D SERVER_CONFIG_FILE= conf/httpd.conf
If you want display only the Apache version number, use the option -v (lower-
case v) as shown below.
# httpd -v
Server version: Apache/2.2.9 (Unix)
Server built: Jul 14 2008 15:36:56
Hack 83. Load a specific module only on demand
Sometimes you may not want to load all the modules in the Apache. For e.g.
You may want to load ldap related modules to Apache, only when you are
testing LDAP. This can be achieved as shown below.
Modify the httpd.conf and add IfDefine directive called load-ldap (you can
name this anything you want).
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module
103
Linux 101 Hacks www.thegeekstuff.com
modules/mod_authnz_ldap.so
When you are testing ldap and would like to Load the ldap related modules,
pass the load-ldap to Option -D, as shown below:
# httpd -k start -e debug -Dload-ldap -f
/etc/httpd/conf/httpd.conf.debug
[Sun Aug 17 14:14:58 2008] [debug] mod_so.c(246):
loaded module ldap_module
[Sun Aug 17 14:14:58 2008] [debug] mod_so.c(246):
loaded module authnz_ldap_module
[Note: Pass -Dload-ldap, to load the ldap modules into
Apache]
# apachectl start
[Note: Start the Apache normally, if you don't want to
load the ldap modules.
104
Linux 101 Hacks www.thegeekstuff.com
Chapter 11: Bash Scripting
Hack 84. Execution Sequence of .bash_* files
What is the sequence in which the following files are executed?
o /etc/profile
o ~/.bash_profile
o ~/.bashrc
o ~/.bash_login
o ~/.profile
o ~/.bash_logout
Execution sequence for interactive login shell
Following pseudo code explains the sequence of execution of these files.
execute /etc/profile
IF ~/.bash_profile exists THEN
execute ~/.bash_profile
ELSE
IF ~/.bash_login exist THEN
execute ~/.bash_login
ELSE
IF ~/.profile exist THEN
execute ~/.profile
END IF
END IF
END IF
105
Linux 101 Hacks www.thegeekstuff.com
When you logout of the interactive shell, following is the sequence of
execution:
IF ~/.bash_logout exists THEN
execute ~/.bash_logout
END IF
Please note that /etc/bashrc is executed by ~/.bashrc as shown below:
# cat ~/.bashrc
if [ -f /etc/bashrc ]; then
. /etc/bashrc
Fi
Execution sequence for interactive non-login shell
While launching a non-login interactive shell, following is the sequence of
execution:
IF ~/.bashrc exists THEN
execute ~/.bashrc
END IF [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • blacksoulman.xlx.pl