Java Mailing List Archive

http://www.apache-httpd.com/

Home » users.httpd »

[users@httpd] editing httpd.conf file through shell script

Agnello George

2008-06-18

Replies: Find Java Web Hosting

Author LoginPost Reply

hi

i am trying to edit my httpd.comf file through a shell script ......      (( actually I trying to set up a control panel ))  

my httpd.conf host directives for many domains  , the file is  something like this :
 

##########START#######rodney.com###################

<VirtualHost 192.168.0.244:80>
ServerAdmin admin@ashish.sys.qualiproj.com
ServerName rodney.sys.qualiproj.qualispace.com
ServerAlias www.rodney.sys.qualiproj.qualispace.com
DocumentRoot /websites/rodney.com/web
ErrorLog /websites/rodney.com/logs/rodney.sys.qualiproj.error_log
CustomLog /websites/rodney.com/logs/rodney.sys.qualiproj.access_log common
</VirtualHost>
##########END############rodney.com###################


#########START#########vodafone###################

<VirtualHost 192.168.0.244:80>
ServerAdmin admin@ashish.sys.qualiproj.com
ServerName fff.sys.qualiproj.qualispace.com
ServerAlias www.fff.sys.qualiproj.qualispace.com
DocumentRoot /websites/vodafone/web
ErrorLog /websites/vodafone/logs/fff.sys.qualiproj.error_log
CustomLog /websites/vodafone/logs/fff.sys.qualiproj.access_log common
</VirtualHost>
#########END#########vodafone2631###################
 
now through a shell script i need to add mime type  for domain vodafone.com , i would  need to add the following bellow "DoucmentRoot"
 
AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

How can this be done ? would i need to know Perl scripting ..or can this be done without the knowledge of Perl

Your help would be of great value !!

--
Regards
Agnello Dsouza
www.linux-vashi.blogspot.com
 
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.