[CentOS] script question
Emmett Culley
emmett at webengineer.comThu Mar 31 18:21:51 UTC 2011
- Previous message: [CentOS] script question
- Next message: [CentOS] CentOS-announce Digest, Vol 73, Issue 6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 03/31/2011 05:25 AM, Jerry Geis wrote: > I can do "simply" search and replace with sed. > However, I want to setup httpd.conf from a script > that changes the default "/" which is presently: > > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > > and change it to the following: > > <Directory /> > Order Deny,Allow > Deny from all > AllowOverride None > </Directory> > > How do you do that with scripts? Basically substitute everything between > the two Directory tags. > > Thanks, > > Jerry > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > > Try: sed -i "/<Directory \/>/,/<\/Directory/ s|Options FollowSymLinks|Order Deny,Allow\n Deny from all|" /etc/httpd/conf/httpd.conf
- Previous message: [CentOS] script question
- Next message: [CentOS] CentOS-announce Digest, Vol 73, Issue 6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list