{"id":839,"date":"2017-09-04T12:25:36","date_gmt":"2017-09-04T18:25:36","guid":{"rendered":"https:\/\/wmbuck.net\/blog\/?p=839"},"modified":"2017-09-04T12:25:36","modified_gmt":"2017-09-04T18:25:36","slug":"apache-module-debugging","status":"publish","type":"post","link":"https:\/\/wmbuck.net\/blog\/?p=839","title":{"rendered":"Apache module debugging"},"content":{"rendered":"<p>I have some problem using mod_xsendfile on tarragon. I&#8217;ve been working on getting this working for 2 days. I have had to get into the source code of the apache module to figure it out, and I want to turn on the debugging option to see what is going on.<\/p>\n<p>So I have to recompile the c source file, with the define of _DEBUG, and install the it as a module. Had to figure out how to do this. It is very easy. But easy doesn&#8217;t mean I&#8217;ll remember it, thus this post.<\/p>\n<p>I cloned the source:<\/p>\n<p>git clone https:\/\/github.com\/nmaier\/mod_xsendfile (into my local git repo), and then cd into the directory, and<\/p>\n<p>apxs -D_DEBUG -i -c mod_xsendfile.c<\/p>\n<p>This creates the module with debugging defined, and puts it in \/usr\/lib64\/httpd\/modules\/mod_xsendfile.so<\/p>\n<p>It still needs to be loaded into apache. Instructions at his site say to use the -a flag, to activate, but while that would work on a simple site, it tries to put the LoadModule into \/etc\/httpd\/conf\/httpd.conf, and all my LoadModule statements are in files in the directory \/etc\/httpd\/conf.modules.d so I need to create \/etc\/httpd\/conf.modules.d\/xsendfile.conf containing:<\/p>\n<p>LoadModule xsendfile_module modules\/mod_xsendfile.so<\/p>\n<p>The module will log debug statements, but this still won&#8217;t actually get you any log records until you set LogLevel debug in the apache config file.<\/p>\n<p>Then restart apache and Bob&#8217;s your uncle.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have some problem using mod_xsendfile on tarragon. I&#8217;ve been working on getting this working for 2 days. I have had to get into the source code of the apache module to figure it out, and I want to turn on the debugging option to see what is going on. So I have to recompile &hellip; <a href=\"https:\/\/wmbuck.net\/blog\/?p=839\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Apache module debugging<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,10,4,15],"tags":[],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-apache","category-fedora","category-linux","category-website-building"],"_links":{"self":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/839"}],"collection":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=839"}],"version-history":[{"count":1,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/839\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/839\/revisions\/840"}],"wp:attachment":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}