LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-28-2011, 07:04 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
error in running two webserver in single server with two diff ipaddress


Hi




i configured sever1.conf server2.conf file httpd directory and modified the document root for server2.conf and server1.conf i had pasted my server1.conf file conf

vi /etc/httpd/server1.conf

<VirtualHost *:80>
ServerName
DocumentRoot "/usr/local/tomcat8080/webapps/ROOT"
<Directory "usr/local/tomcat8080/webapps/ROOT">
# Options Indexes FollowSymLinks MultiViews
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog logs/app1-error.log
CustomLog logs/app1-access.log combined
# Send ROOT app. to worker named app1
JkMount /* app1
JkUnMount /images/* app1
RewriteEngine On
RewriteRule ^/(images/.+);jsessionid=\w+$ /$1
</VirtualHost





vi /etc/httpd/httpd.conf

#
# Mod_jk settings
#
# Load mod_jk module
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel emerg
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"


workers.properties conf file

#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# The workers that jk should create and work with
#

workers.tomcat_home=/usr/local/tomcat8080
workers.java_home=/usr/lib/jvm/java
ps=/
worker.list=app1, app2

worker.app1.port=8009
worker.app1.host=localhost
worker.app1.type=ajp13
worker.app1.lbfactor=1

worker.app2.port=8010
worker.app2.host=localhost
worker.app2.type=ajp13
worker.app2.lbfactor=1


ist ipaddress 21.21.32.21 listen to port 80 and 8080
2 ipaddress 54.65.25.31 listen to port 9090 andlistening to port 80


can someone help me how can i solve the issue


regards
arun

Last edited by jsaravana87; 09-28-2011 at 08:51 AM.
 
Old 09-28-2011, 07:17 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Make sure in your httpd conf files you have your "Listen" directives and your "<Virtual Host>" direcives set up to listen on the specific IP addresses you want the server to bind to. Having things like *:80 will cause it to bind on all available IP addresses on port 80.
 
Old 09-28-2011, 07:21 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
why run two instances of apache? virtual hosts will allow you to run a single instance, doing different things on different ips
 
Old 09-28-2011, 07:29 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,474

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by acid_kewpie View Post
why run two instances of apache? virtual hosts will allow you to run a single instance, doing different things on different ips
We do it here for certain production sites, it's just another level of "mitigation", so that if something causes one instance of apache to barf then sites on the other IPs have a better chance of staying available.
 
Old 09-28-2011, 08:55 AM   #5
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
i got my problem solved. i had problem in server.xml configuration i made it wright now my server works fine... Thanks all for ur reply.
Regards
arun

Last edited by jsaravana87; 09-28-2011 at 08:59 AM.
 
Old 09-28-2011, 10:44 PM   #6
hhh123
Member
 
Registered: Jul 2009
Location: /
Distribution: centos
Posts: 47

Rep: Reputation: 1
Hi i think the simplest method is to change listing port. In apache there is "Listen" parameter.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Single Server Running Apache on Two Lan's? carlosinfl Linux - Networking 1 06-23-2010 06:48 PM
outgoing registration email is not going I running webserver server behind a proxy tkmsr Linux - Server 3 04-17-2010 07:29 AM
input output error while running 'diff' on a ntfs disk nass Linux - Software 1 12-14-2008 08:56 AM
Getting a webserver/mail server up and running... Elnsoxo Debian 1 03-19-2006 01:19 PM
after chnaging the ipaddress of nagios server new hosts adding error sridhar11 Linux - Software 0 10-26-2005 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration