## How to implement disable directory browsing in WebLogic 5.1
### weblogic.httpd.indexDirectories=false### Backup current weblogic.properties, verify the presence of the backup file
###
cd $PS_HOME/weblogic
cp -p $PS_HOME/weblogic/weblogic.properties $PS_HOME/weblogic/weblogic.properties__bkp_$(date +\%Y\%m\%d_\%H\%M\%S)
ls -ltr | grep weblogic.properties
### Append the directive to diable directory bowsing at the end of the file, make sur to paste the ">> weblogic.properties"
###
printf "\#\n" >> weblogic.properties
printf "\# 20141103 - Disable directory browsing - BEGIN\n" >> weblogic.properties
printf "weblogic.httpd.indexDirectories=false\n" >> weblogic.properties
printf "\# 20141103 - Disable directory browsing - END\n" >> weblogic.properties
printf "\#\n" >> weblogic.properties
echo Finished updating weblogic.properties
### Verify the timestamp on weblogic.properties
###
ls -ltr | grep weblogic.properties
### Verify the content (end part) of weblogic.properties to ensure it is syntaxically correct
###
cat weblogic.properties
### Bounce the WebLogic instance
stopWebLogic.sh
psW
# Wait till instance has stopped, repeat "psW" until nothing shows
startWebLogic.sh
### task complete
No comments:
Post a Comment