sed -i '11 b; s/AllowOverride None\b/AllowOverride All/' test
I searched everywhere and have had no luck. here is what I'm trying to do.
I have a single file I want to edit one line that appears 4 times. in this case line 11.
I want to change it from
AllowOverride None
to
AllowOverride All
and "test" at the end of my code is the file name
Thank you
Last edited by Franklin52; 08-28-2012 at 04:32 AM..
Reason: Please use code tags for data and code samples
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hi new to the forum,
I have a Apache server on CentOS which hosts a web site. I've set up the SSL which has been tested as I can access my website via http and https.
I would like to redirect all browsers to use https instead of http. I have created the htaccess file which contains 'Allow... (3 Replies)
Source: Apache.org
The .htaccess file is not read by the server based the test above and the lack of change in the operation of the server.
httpd.conf
<Directory />
Options None
AllowOverride All
# Initially this was set to None and I would prefer it be again, just testing
... (6 Replies)
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
I am testing shc to see if it would help with my need.
Im at a point where Im trying to compile and test the "test.ksh" file that comes in the tar ball :
shc-3.8.9> shc -v -r -f test.ksh
shc shll=ksh
shc =-c
shc =exec '%s' "$@"
shc =
shc opts=
shc: cc test.ksh.x.c -o test.ksh.x... (7 Replies)
Discussion started by: popeye
7 Replies
LEARN ABOUT MINIX
upsset.conf
UPSSET.CONF(5) NUT Manual UPSSET.CONF(5)NAME
upsset.conf - Configuration for Network UPS Tools upsset.cgi
DESCRIPTION
This file only does one job--it lets you convince upsset.cgi(8) that your system's CGI directory is secure. The program will not run until
this file has been properly defined.
SECURITY REQUIREMENTS upsset.cgi(8) allows you to try login name and password combinations. There is no rate limiting, as the program shuts down between every
request. Such is the nature of CGI programs.
Normally, attackers would not be able to access your upsd(8) server directly as it would be protected by the LISTEN directives in your
upsd.conf(5) file, tcp-wrappers (if available when NUT was built), and hopefully local firewall settings in your OS.
upsset runs on your web server, so upsd will see it as a connection from a host on an internal network. It doesn't know that the connection
is actually coming from someone on the outside. This is why you must secure it.
On Apache, you can use the .htaccess file or put the directives in your httpd.conf. It looks something like this, assuming the .htaccess
method:
<Files upsset.cgi>
deny from all
allow from your.network.addresses
</Files>
You will probably have to set "AllowOverride Limit" for this directory in your server-level configuration file as well.
If this doesn't make sense, then stop reading and leave this program alone. It's not something you absolutely need to have anyway.
Assuming you have all this done, and it actually works (test it!), then you may add the following directive to this file:
I_HAVE_SECURED_MY_CGI_DIRECTORY
If you lie to the program and someone beats on your upsd through your web server, don't blame me.
SEE ALSO upsset.cgi(8)
Internet resources:
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/22/2012 UPSSET.CONF(5)