Posted by: {authorName}

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

 

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

Comments

blog comments powered by Disqus