Archive | Apache RSS feed for this section

ajp-APACHE-TO-TOMCAT-TOMEE

4 Jul

http://mobiarch.wordpress.com/2013/09/21/apache-to-tomcat-connection-via-ajp/#more-559

Advertisements

Connecting Apache’s Web Server to Multiple Instances of Tomcat

11 Jan

Connecting Apache’s Web Server to Multiple Instances of Tomcat

Use of mod_jk of apache for forward request at tomcat

http://www.linuxjournal.com/article/8561

 

Link

configure Virtual host for Apache on ubuntu 10.04

17 Sep

10 must-know Apache directives and modules

http://www.techrepublic.com/blog/10-things/10-must-know-apache-directives-and-modules/

—————————————————————————————————————————————————————————————————————————————————————————

A guide for virtual host on Apache2.2

https://library.linode.com/web-servers/apache/installation/ubuntu-10.04-lucid

File:/etc/apache2/sites-available/example.net

<VirtualHost *:80> ServerAdmin webmaster@example.net ServerName example.net ServerAlias http://www.example.net DocumentRoot /srv/www/example.net/public_html/ ErrorLog /srv/www/example.net/logs/error.log CustomLog /srv/www/example.net/logs/access.log combined </VirtualHost>

If you would like to enable Perl, add the following lines to the VirtualHost entry above.

File excerpt:/etc/apache2/sites-available/example.net

Options ExecCGI
AddHandler cgi-script .pl

Next, create ducklington.org (/etc/apache2/sites-available/example.org) so that it resembles this:

File:/etc/apache2/sites-available/example.org

<VirtualHost *:80>
ServerAdmin admin@example.org
ServerName example.org
ServerAlias http://www.example.org
DocumentRoot /srv/www/example.org/public_html/
ErrorLog /srv/www/example.org/logs/error.log
CustomLog /srv/www/example.org/logs/access.log combined
</VirtualHost>

You’ll note that some basic options are specified for both sites, including where the files for the site will reside (under /srv/www/). You can add (or remove) additional configuration options, such as the Perl support, on a site-by-site basis to these files as your needs dictate.

Create required directories for these sites by issuing the following commands:

mkdir -p /srv/www/example.net/public_html
mkdir /srv/www/example.net/logs

mkdir -p /srv/www/example.org/public_html
mkdir /srv/www/example.org/logs

Enable the sites by issuing these commands:

a2ensite example.net
a2ensite example.org

Finally, restart the Apache server to initialize all the changes, with this command:

/etc/init.d/apache2 restart

When you create or edit any virtual host file, you’ll need to reload the config, which you can do without restarting the server with the following command:

/etc/init.d/apache2 reload

Congratulations! You now have Apache installed on your Ubuntu Linux VPS and have configured the server for virtual hosting.

———————————————————–

Install Apache Modules
One of Apache’s prime strengths is its extreme customizability and flexibility. With its support for a large number of modules, there are few web serving tasks that Apache cannot fulfill. By default, modules and their configuration files are installed in the /etc/apache2/mods-available/ directory. Generating a list of this directory will tell you what modules are installed. To enable a module listed in this directory, use the following command:

a2enmod [module-name]

Note that in the /etc/apache2/mods-available/ directory, files have a .load and .conf extension. Module names do not include the extension.

To disable a module that is currently enabled, use the inverse command:

a2dismod [module-name]

To get a list of available Apache modules modules in the Ubuntu repository use the following command:

apt-cache search libapache2*

To install one of these modules use the command:

apt-get install [module-name]

Modules should be enabled and ready to use following installation, though you may have to apply additional configuration options to have access to the modules’ functionality. Consult the Apache module documentation for more information regarding the configuration of specific modules.

Configuration Options
One of the strengths, and obstacles, of Apache is the immense amount of flexibility offered in its configuration files. In the default installation of Apache 2 on Ubuntu, the main configuration is located in the /etc/apache2/apache2.conf files, but Apache configuration directives are loaded from files in a number of different locations, in a specific order. Configuration files are read in the following order, with items specified later taking precedence over earlier and potentially conflicting options:

/etc/apache2/apache2.conf
1. Files with .load or .conf extensions in /etc/apache2/mods-enabled/ directory.
2. /etc/apache2/httpd.conf (Blank by default.)
3. /etc/apache2/ports.conf
4. Files within the /etc/apache2/conf.d/ directory.
5. Files within the /etc/apache2/sites-enabled/ directory.
6. Per-directory .htaccess files in the directory.
7.
Remember, later files take precedence over earlier-cited files. Within a directory of included configuration files, files will be read in order based on the sort of their file names.

Apache will follow symbolic links to read configuration files, so you can create links in these directories and locations to files that are actually located elsewhere in your file system.

Best practices for most installations dictate that we don’t recommend modifying the following default configuration files: /etc/apache2/httpd.conf, files in /etc/apache2/mods-enabled/, and in most cases /etc/apache2/apache2.conf. This is to avoid unnecessary confusion and unintended conflicts in the future.

Generally, as specified in our LAMP guide for Ubuntu 10.04 LTS (Lucid) and elsewhere, files that configure virtual hosts should be located in the /etc/apache2/sites-available/ directory (and symbolically linked to sites-enabled/ with the a2ensite tool. This allows for a clear and specific per-site configuration.

In practice, the vast majority of configuration options will probably be located in site-specific virtual host configuration files. If you need to set a system-wide configuration option or aren’t using virtual hosting, the best practice is to specify options in files created beneath the conf.d/ directory.