You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Pre-requisites - Understanding your environment

The Opmantke VM Appliance is CentOS 6 and ships with Apache v2.2 

The latest version of Apache which ships with most recent OSs is Apache v2.4

There are differences in where Configuration files are stored between OSs.  There is a difference in the syntax for configuration files between apache versions.

Note now what OS you are on and what Apache version you have.

Getting The Real Details

There are lots of useful things you can do with proxying and Apache. For example pushing URLs from HTTP to HTTPS, doing SSL offload, having different URLs for different customers, having the same server name for lots of your services hosted on different internal servers etc. To properly understand all the details refer to:

Apache 2.4

http://httpd.apache.org/docs/current/howto/reverse_proxy.html

Apache 2.2

 

Of course your company may also have sophisticated proxying and load balanncing appliances already in place, in which case do use those.

 

Proxy Configuration on Opmantek VM - CentOS6 - Apache 2.2

We need to add several Vhosts for the local host and for the proxied Slaves.

We already have several vHosts in operation for normal operation of OMK modules.

These are .......

 

To extend the current ones we should 

??  Extend the currernt

??  Create new ones and add them to the current location see "Where are the configuration files"

Where are the configuration files.

http://wiki.apache.org/httpd/DistrosDefaultLayout

Centos

 ServerRoot              ::      /etc/httpd
 Primary Config Fle      ::      /etc/httpd/conf/httpd.conf
 Other Config Files      ::      /etc/httpd/conf.d
 Module Locations        ::      /usr/lib/httpd/modules
 DocumentRoot            ::      /var/www/html
 ErrorLog                ::      /var/log/httpd/error_log
 AccessLog               ::      /var/log/httpd/access_log
 cgi-bin                 ::      /var/www/cgi-bin (empty and disabled by default)
 binary                  ::      /usr/sbin/httpd
 runtime directory       ::      /etc/httpd/run
 start/stop              ::      /sbin/service httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}

Notes:

  1. There is an extra config file in /etc/sysconfig/httpd which can be used to change to the worker mpm /usr/sbin/httpd.worker. 

  2. Extra config files named *.conf are loaded from /etc/httpd/conf.d. This directory is used by packages like mod_python for drop-in configs 

  3. If you're having issues with authorization and your permissions are correct, you might have problems with SELinux permissions. Take a look at httpd_selinux(8) and related documentation. Particularly sealert(8) can be used for analysis and suggested solutions.

Debian Debian, Ubuntu (Apache httpd 2.x):

 ServerRoot              ::      /etc/apache2
 DocumentRoot            ::      /var/www
 Apache Config Files     ::      /etc/apache2/apache2.conf
                         ::      /etc/apache2/ports.conf
 Default VHost Config    ::      /etc/apache2/sites-available/default, /etc/apache2/sites-enabled/000-default
 Module Locations        ::      /etc/apache2/mods-available, /etc/apache2/mods-enabled
 ErrorLog                ::      /var/log/apache2/error.log
 AccessLog               ::      /var/log/apache2/access.log
 cgi-bin                 ::      /usr/lib/cgi-bin
 binaries (apachectl)    ::      /usr/sbin
 start/stop              ::      /etc/init.d/apache2 (start|stop|restart|reload|force-reload|start-htcacheclean|stop-htcacheclean)

Notes:

 

  1. The Debian/Ubuntu layout is fully documented in /usr/share/doc/apache2/README.Debian 

  2. Debian/Ubuntu use symlinks to configure vhosts and load modules. Configuration files are created in their respective sites-available and mods-available directories. To activate vhosts and modules, symlinks are created in the respective sites-enabled and mods-enabled directories to the config files in either sites-available and mods-available. Debian provides scripts to handle this process called 'a2ensite' and 'a2enmod' which activates vhosts and modules. 

  3. The default vhost is defined in /etc/apache2/sites-available/default, and overrides the DocumentRoot set in the server context.

  • No labels