- creare un file worker.properties nella cartella di apache
sudo nano /etc/apache2/workers.properties
e incolliamo quanto segue:
workers.tomcat_home=/usr/local/tomcat6
workers.java_home=/usr/lib/jvm/java-6-openjdk/jre/bin/java
ps=/
worker.list=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.type=ajp13
Tip: per conoscere il percorso attuale di java utilizzare il comando whereis java
- modifichiamo jk.load
sudo nano /etc/apache2/mods-available/jk.load
e incolliamo quanto segue dopo la linea LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so:
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /etc/apache2/mod_jk.log
JkLogLevel error
JkMount /examples ajp13
JkMount /examples/* ajp13
- modifichiamo httpd.conf
sudo nano /etc/apache2/httpd.conf
e incolliamo quanto segue:
ServerAdmin webmaster@localhost
DocumentRoot /var/www
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
- disabilitare il file di configurazione di default di apache
sudo a2dissite default
- modifichiamo il file ports.conf
dobbiamo togliere la riga NameVirtualHost *:80:
- riavviamo Apache e Tomcat sudo /etc/init.d/apache2 restart
sudo /etc/init.d/tomcat6 restart
Fatto!
ServerAdmin webmaster@localhost
DocumentRoot /var/www
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
dobbiamo togliere la riga NameVirtualHost *:80:
sudo nano /etc/apache2/ports.conf
Fatto!
Nessun commento:
Posta un commento