Apache

  

These are my personal notes that I use as a quick help in my work.
You are welcome to read them.

Contents of current page Top-level home page
 
Index  Java Internet Oracle Notes
Linux Basics Web Basics SQL Notes
Informatica Servlets Apache BkpRstore SQL*Plus
Teradata   LDAP Storage PL/SQL
Windows     Tables OEM
UML   Net8 Portal
SQL Server Python perl Performance OLAP
Vmware Visual Basic PHP/MySQL User Mgmt  
Git        
More technical pages here

Contents

 


Introduction

  

 


Directives

Port number=default port, if no "listen" directives are present. Otherwise, if one or more "listen" directives are present, the server listens on the listening ports and not on the the port defined with "port". The port value is the default port for redirected URLs or other URLs generated by server. Normally, one of the listening directives has the same number as the default port. For web caches, set the port directive to the port for the Web Cache and set the listen directives to the ports to which HTTP Server is listening: the redirected URLs will point to Web Cache, rather than directly to Oracle HTTP Server.

Maximum requests Processed Simultaneously (maximum users): maximum number of child processes on UNIX (best: 150) or maximum number of threads on Windows.

MaxRequestsPerChild: maximum number of requests for one of the child processes. Not available for Windows. In Windows, a parent process launches one child process and each of the requests is handled by a thread. In UNIX, one parent process launches several child processes.

KeepAlive: time before a new request
Timeout: time out after request is first made.

MaxKeepAliveRequests: maximum number of requests per connection, 0--> unlimited.

 

 


Some Tips

ServerRoot ".../Apache"
No slash at end
Port 80
Under 1024, must be root
Listen n
For SSL
ServerAdmin
A real person's email address
ServerName
Valid DNS name
User
The user under which Apache will run (starts in root but switches over)
<IfModule mod_userdir.c>
UserDir a-directory
</ifModule>
Name of directory where user directories are defined
DocumentRoot ...Apache/htdocs
Start of all web pages
<IfModule mod_dir.c>
DirectoryIndex the_index_page.html another-default-page.html
</IfModule>
Default pages in the DocumentRoot
<Directory "D:\ORACLE\iSuites\Apache\Apache/htdocs">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Permissions on default directory
ErrorLog path/name
Main error log
LogLevel warn
Level of detail in error log
 
redirect /admin http://ServerName/new_url
Redirect requests
include "...Apache\Jserv\conf\jserv.conf"
Include other configuation files (at end of httpd.conf)
Redirect /namepath http://hostname:portnumber/pls/portal
Redirection

 

Rewrite

(Set "RewriteEngine On" in configuration for mod_rewrite)

RewriteRule OriginalPath RewrittenPath [flags]

 


Virtual Hosts

NameVirtualHost * --> name-based virtual hosting, i.e. the virtual host is defined by the name. Mandatory for SSL with 9iAS. IP-based virtual host means that a different IP address is needed for each virtual host.

<VirtualHost *>
  ServerName new-virtual-server-name
  DocumentRoot "...Apache/htdocs"
  ServerAdmin real.person@some.address.com
  <IfModule mod_dir.c>
    DirectoryIndex the_index_page.html another-default-page.html
  </IfModule>
  ErrorLog path/error.log
  CustomLog path/access.log
  ServerAlias ...com ...ch ...glu
</VirtualHost>

Use * instead of ip-address --> this is name-based virtual hosting
ServerAlias optional
If error and custom log indications are absent, then main server's logs are used.

 


Examples

Minimal configuration on Windows, but not as a service:

ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"
Listen 8080
LoadModule .... a whole bunch
ServerName TestServer:8080
#Put this in the hosts file:
# 127.0.0.1 TestServer
#Enter this in the browser:
# http://TestServer:8080
#
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

 

 


Tomcat

 

The Tomcat users are defined in: ...\conf\tomcat-users.xml
The passwords are unencrypted

Context files are located in: ...\conf\Catalina\localhost
Three contexts are defined by default: admin.xml, host-manager.xml , and manager.xml

Content for context files
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:\...\webapps\the_app_name" path="/whatever_apps">
</Context>