Deprecated: Creation of dynamic property WPtouchProFour::$settings_object is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php on line 82

Deprecated: Automatic conversion of false to array is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/admin-load.php on line 70

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$toolbar_classic_block is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 347

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$toolbar_block is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 349

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$toolbar_block_side is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 350

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$panels_block is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 351

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$used_block_buttons is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 354

Deprecated: Creation of dynamic property YARPP::$is_custom_template is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php on line 56

Deprecated: Creation of dynamic property YARPP::$db_options is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/feed-rss2.php on line 8
httpd – Rajesh https://tech.learnerandtutor.com A Developer Tue, 09 Jun 2015 04:55:15 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 Apache http server in detail – 1 https://tech.learnerandtutor.com/apache-http-server-in-detail-1/ https://tech.learnerandtutor.com/apache-http-server-in-detail-1/#respond Tue, 25 Nov 2014 08:04:38 +0000 http://tech.learnerandtutor.com/?p=526 Continue reading ]]> To verify httpd installed or not

rpm -qa httpd
(will display the package details if available)
 ex: httpd-2.2.15-29.el6_4.x86_64

Default Paths

/usr/sbin/httpd         command path
/etc/httpd              httpd root path
/etc/httpd/conf         Main config path
/etc/httpd/conf.d       Additional config path
/etc/httpd/logs         Link pointed to httpd log & error log

 Default log files of Apache Webserver

access_log           All access details
error_log            All Error Details

To re-load the config/modules

service httpd reload

To start the httpd service

service httpd start

To stop the httpd service

service httpd stop

To restart the httpd service

service httpd restart

To check the status of the service

service httpd status

Default Declarations used in the configuration file

ServerRoot                Default Root location of httpd
PidFile                   id of the initial httpd server;Because apache will create by default 
                          additional child process to handle traffic
DocumentRoot              File System Root Directory
  •  All paths mentioned in the config file will be calculated from ServerRoot path (i.e) Relative path
  • Default error log will be calculated from the server root directory. If one wants the error log to be moved to another place, create log directory as a symbolic link to another required folder. (Ex /var/log/httpd/logs)

Number of Server instances needs to be started can be set up in the below section.

<IfModule prefork.c>
     StartServers       8
     MinSpareServers    5
     MaxSpareServers   20
     ServerLimit      256
     MaxClients       256
     MaxRequestsPerChild  4000
</IfModule>

# StartServers: &nbsp;&nbsp; &nbsp;     number of server processes to start
# MinSpareServers:&nbsp;&nbsp; &nbsp;   minimum number of server processes which are kept spare
# MaxSpareServers: &nbsp;&nbsp;    maximum number of server processes which are kept spare
# ServerLimit: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;    maximum value for MaxClients for the lifetime of the server
# MaxClients: &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;   maximum number of server processes allowed to start
# MaxRequestsPerChild:   maximum number of requests a server process serves

 Directives

  • Directory tag                                 –    can be used to apply settings for particular directory.
  • DirectoryMatch tag                      –    Same as Directory tag but we can use patterns.(i.e) setting rules for multiple directories (ex)
    <DirectoryMatch "^/www/(.+/)?[0-9]{3}">

    would match directories in /www/ that consisted of three numbers.

  • Options FollowSymLinks                 –    Webpages under this directory can point to any files under / directory via symbolic link. (i.e) outside of www directoy
  • AllowOverride None                          –    If set that partiular directory configuration can be overridden via .htaccess file
  • Order allow deny / deny allow        –    The meaning is if we mentioned allow deny then first allow will be taken, then deny will be taken
    if we mentioned deny allow then first deny will be taken then allow will be taken
    What is the cause of this? For example if we give like below

    Order deny allow
    allow from all
    deny from 192.168.101.100

    the expectation is to deny only from 192.168.101.100. But it will allow all people. Because we gave deny at first, allow later. So allow will over write deny order

  • Options Indexes                                   –    respond with directory listing if the index file not available. -Indexes (not allowed)  ,+Indexes (allowed)
  • Files Directive                                       –    similiar like Directory Directive; the difference is files directive is at file level where Directory directive is at directory level
  • FilesMatch directive                             –    similar like DirectoryMatch but for files
  • Location directive                                 –    similar like Files,Directory directives; but based on url config will be applied
    (ex)

    <Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 192.168.227.1
    </Location>
]]>
https://tech.learnerandtutor.com/apache-http-server-in-detail-1/feed/ 0