Hi, I was wondering if someone could help me out here. I am super-paranoid, so am trying to limit what PHP files can be executed on this server. I have a small list of files that I want to allow. The rest, deny:
I want to then allow the execution of a few PHP files in a specific directory:
My problem is that the ALLOW FROM ALL statements in the above FILE sections allow anyone in, even if they are denied in the root directory .htaccess, or in the root directory's httpd.conf LIMIT. So that's not what I really want. I just want those 2 php files to be executable IF you're not otherwise locked out elsewhere. Does anyone know how I should configure this to work right?
Thanks
Last edited by radoulov; 05-20-2011 at 04:04 PM..
Reason: Code tags fixed.
I have found in the httpd.conf where it it states the default parse pages like index.htm, index.html, index.php and etc....However, my computer box does not seem to want to automatically load the index.php files. Anyone have any ideas? (5 Replies)
Have been asked to remove all images from being logged to the access_log ... where am I going wrong?<VirtualHost 123.456.789.99>
ServerName www.somedomain.com.au
DocumentRoot /agents/tts
Redirect /wap http://somewap.com.au/traveler
LogFormat "%v %h %l %u %t \"%r\" %>s %b" comonvhost... (2 Replies)
I have just configured httpd.conf on a new Redhat 9 install. Below are my additions to httpd.conf. Everything works fine except that when typing http://spetnik.d2g.com into my web browser, I am sent to the "Default catch all" site. Any clues?
NameVirtualHost *:80
#Default catch all ... (5 Replies)
Hi everybody,
I have installed Apache 2 + Tomcat 5.5. on Ubuntu 7.04 and the default httpd.conf is empty (0 lines), however there is a file called apache2.conf that looks like a default httpd.conf.
I didn't use Apache in ages, since 1.3.x release, but I remember that the httpd.conf by default... (2 Replies)
I'd like to know if servername in apache httpd.conf is the machine name or domain name. If it is domain name like example.com, should it be registered before in use? (1 Reply)
Hi, I was wondering if someone could help me out here. I am super-paranoid, so am trying to limit what PHP files can be executed on this server. I have a small list of files that I want to allow. The rest, deny. So I have base rule that denies all php files server-wide: order allow,deny ... (0 Replies)
Hello Guys !!
wanted to use SED to pull cout the full vertualhost entry for domain which is specified from command line
Like (IP base httpd.conf)
domain="ServerName takemewithyou.in"
sed -n '/<VirtualHost* $domain/,/<\/VirtualHost>/p' httpd.conf
File can take to test is below
... (0 Replies)
I want to search for a block of text in httpd.conf that between two strings and comment it. There are multiple blocks with "<Directory.. and </Directory>"
<Directory "${ORACLE_INSTANCE}/config/${COMPONENT_TYPE}/${COMPONENT_NAME}/htdocs">
#
# Possible values for the Options directive are... (3 Replies)
hi
is it possible ?
explain tome about below items
StartServers 8
MinSpareServers 10
MaxSpareServers 20
ServerLimit 4000
MaxClients 4000
MaxRequestsPerChild 4000
this is my servers 8gig ram & cpu 12 core...
what cann i putting in order this ?
tnx (1 Reply)
Discussion started by: mnnn
1 Replies
LEARN ABOUT REDHAT
dbi::profiledumper::apache
DBI::ProfileDumper::Apache(3) User Contributed Perl Documentation DBI::ProfileDumper::Apache(3)NAME
DBI::ProfileDumper::Apache - capture DBI profiling data from Apache/mod_perl
SYNOPSIS
Add this line to your httpd.conf:
PerlSetEnv DBI_PROFILE DBI::ProfileDumper::Apache
Then restart your server. Access the code you wish to test using a web browser, then shutdown your server. This will create a set of
dbi.prof.* files in your Apache log directory. Get a profiling report with dbiprof:
dbiprof /usr/local/apache/logs/dbi.prof.*
When you're ready to perform another profiling run, delete the old files
rm /usr/local/apache/logs/dbi.prof.*
and start again.
DESCRIPTION
This module interfaces DBI::ProfileDumper to Apache/mod_perl. Using this module you can collect profiling data from mod_perl applications.
It works by creating a DBI::ProfileDumper data file for each Apache process. These files are created in your Apache log directory. You
can then use dbiprof to analyze the profile files.
USAGE
LOADING THE MODULE
The easiest way to use this module is just to set the DBI_PROFILE environment variable in your httpd.conf:
PerlSetEnv DBI_PROFILE DBI::ProfileDumper::Apache
If you want to use one of DBI::Profile's other Path settings, you can use a string like:
PerlSetEnv DBI_PROFILE 2/DBI::ProfileDumper::Apache
It's also possible to use this module by setting the Profile attribute of any DBI handle:
$dbh->{Profile} = "DBI::ProfileDumper::Apache";
See DBI::ProfileDumper for more possibilities.
GATHERING PROFILE DATA
Once you have the module loaded, use your application as you normally would. Stop the webserver when your tests are complete. Profile
data files will be produced when Apache exits and you'll see something like this in your error_log:
DBI::ProfileDumper::Apache writing to /usr/local/apache/logs/dbi.prof.2619
Now you can use dbiprof to examine the data:
dbiprof /usr/local/apache/logs/dbi.prof.*
By passing dbiprof a list of all generated files, dbiprof will automatically merge them into one result set. You can also pass dbiprof
sorting and querying options, see dbiprof for details.
CLEANING UP
Once you've made some code changes, you're ready to start again. First, delete the old profile data files:
rm /usr/local/apache/logs/dbi.prof.*
Then restart your server and get back to work.
MEMORY USAGE
DBI::Profile can use a lot of memory for very active applications. It collects profiling data in memory for each distinct query your
application runs. You can avoid this problem with a call like this:
$dbh->{Profile}->flush_to_disk() if $dbh->{Profile};
Calling "flush_to_disk()" will clear out the profile data and write it to disk. Put this someplace where it will run on every request,
like a CleanupHandler, and your memory troubles should go away. Well, at least the ones caused by DBI::Profile anyway.
AUTHOR
Sam Tregar <sam@tregar.com>
COPYRIGHT AND LICENSE
Copyright (C) 2002 Sam Tregar
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
perl v5.8.0 2002-11-29 DBI::ProfileDumper::Apache(3)