KayWeb holdings web design development hosting search engine optimisation ppc advertising email marketing custom web applications systems
  • home
  • about
  • portfolio
  • news
  • blogs
  • featured projects
  • careers
  • contact
Web Design, Development & Hosting
Search Engine Optimisation, PPC Advertising & Email Marketing
Custom Web Applications & Systems

  • Blogs Home
  • Web Development
  • Web Design
  • SEO
  • KayWeb CMS
  • World Wide Web
  • Linux
  • Programming

Subscribe to KayWeb RSS
 
 
internet explorer  
google  
seo web design  
web 2.0  
php  
typography  
chrome  
web design  
seo  
mysql  
Blog
Home -> Blogs -> Linux -> Second instance of apache on another port

Second instance of apache on another port

by Ian Dela Cruz

These steps are done on Fedora 9. Other versions of Fedora (or other flavours of Linux) may still work but paths may be different.

No Comment | Share Your thoughts?

 

On this example, we'll be running the new apache instance with user ian on port 8080.

 

First step is to duplicate the necessary files:

[root@linux ian]# cp -fR /etc/httpd /etc/httpd-ian
[root@linux ian]# cp /usr/sbin/httpd /usr/sbin/httpd-ian
[root@linux ian]# cp /usr/sbin/apachectl /usr/sbin/apachectl-ian

 

Create a new directory which the new instance of apache will be serving.

[root@linux ian]# mkdir /home/ian/www

 

Edit the files using any text editor. I'll be using vim in this example.

[root@linux ian]# vim /etc/httpd/conf/httpd.conf

 

Replace PidFile from run/httpd.pid to run.httpd-ian.pid

 

Replace Listen Port from 80 to 8080

 

Replace all occurences of /var/www/html to /home/ian/www

 

Replace User from apache to ian

 

Replace Group from apache to ian

 

[root@linux ian]# vim /usr/sbin/apachectl-ian

 

Replace HTTPD from '/usr/sbin/httpd' to '/usr/sbin/httpd-ian -f /etc/httpd-ian/conf/httpd.conf'

 

Replace STATUSURL from 'http://localhost:80/server-status' to ="http://localhost:8080/server-status"

 

We are now ready to start a new apache instance.

[root@linux ian]# /usr/sbin/apachectl-ian start


Share this post:
facebook Facebook stumbleupon StumbleUpon digg Digg myspace Myspace technorati Technorati
 
delicious Del.iCio.us yahoo bookmarks Yahoo bookmarks bibsonomy Bibsonomy Kwoff Kwoff
reddit Reddit furl Furl Blogmarks Blogmarks Spurl Spurl newsvine Newsvine

<-- back to Linux category list
<-- back to blog home

Comments 



 
Post Comments

Name (required)
Email
Website
Comment





Web Design, Development & Hosting | Search Engine Optimisation, PPC Advertising & Email Marketing | Custom Web Applications & Systems

home | about | portfolio | news | blogs | featured projects | careers | contact KAYWEB Holdings Pty Ltd. © 2004-2008
All Rights Reserved.