Hi,
I have Apache Server version: Apache/2.4.1 (Unix) and am
running into performance issues on my file system where access are slower than
expected. I believe this is due to unexpected .htaccess file access from
Apache server. I have turned off all checks for htaccess override files in my
httpd.conf file like this.
<Directory />
AllowOverride None
AllowOverrideList None
</Directory>
Yet when I run strace on the file system calls I still get system open commands
on .htaccess for each level of my dir structure like this from strace
61844 mprotect(0x7fb824000000, 135168, PROT_READ|PROT_WRITE) = 0
61844 fcntl(14, F_GETFL) = 0x2 (flags O_RDWR)
61844 fcntl(14, F_SETFL, O_RDWR|O_NONBLOCK) = 0
61844 read(14, "GET / HTTP/1.1\r\nUser-Agent: curl"..., 8000) = 169
61844 stat("/home/httpbld/htdocs/", {st_mode=S_IFDIR|0777, st_size=4096, ...})
= 0
61844 open("/.htaccess", O_RDONLY|O_CLOEXEC) = 15
61844 fstat(15, {st_mode=S_IFREG|0644, st_size=21, ...}) = 0
61844 read(15, "\n\n\n# this is a test\n\n", 4096) = 21
61844 read(15, "", 4096) = 0
61844 close(15) = 0
61844 open("/home/.htaccess", O_RDONLY|O_CLOEXEC) = 15
61844 fstat(15, {st_mode=S_IFREG|0644, st_size=21, ...}) = 0
61844 read(15, "\n\n\n# this is a test\n\n", 4096) = 21
61844 read(15, "", 4096) = 0
61844 close(15) = 0
61844 open("/home/httpbld/.htaccess", O_RDONLY|O_CLOEXEC) = 15
61844 fstat(15, {st_mode=S_IFREG|0644, st_size=21, ...}) = 0
61844 read(15, "\n\n\n# this is a test\n\n", 4096) = 21
61844 read(15, "", 4096) = 0
61844 close(15) = 0
61844 open("/home/httpbld/htdocs/.htaccess", O_RDONLY|O_CLOEXEC) = 15
61844 fstat(15, {st_mode=S_IFREG|0666, st_size=21, ...}) = 0
61844 read(15, "\n\n\n# this is a test\n\n", 4096) = 21
61844 read(15, "", 4096) = 0
61844 close(15) = 0
61844 stat("/home
Please let me know if this is expected of if there is something configuration I
am not setting correctly.
Apache build info:
Server version: Apache/2.4.1 (Unix)
Server built: Apr 23 2012 14:45:07
Server's Module Magic Number: 20120211:0
Server loaded: APR 2.0.0-dev
Compiled using: APR 2.0.0-dev
Architecture: 64-bit
Server MPM: worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/home/httpbld"
-D SUEXEC_BIN="/home/httpbld/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Thanks
Dean..