Updating, recompiling, VirtualHost templates, customizations, php safemode … I need to ensure I have mod_rewrite enabled.
We are getting this question quite a bit, but is not too sure why. It’s always enabling in Apache by default.
To confirm, type:
/usr/sbin/httpd -l | grep mod_rewrite
and you should see
in the output if it’s enabled.
If not, then it is possibly you’re not using one of our compiled binaries, in which case, recompile apache and php:
./build all d
and confirm the “Server built” date is current:
Which Apache mpm am I using?
Though You can ask the httpd binary which mpm is in use with your setup.
httpd -V | grep ‘Server MPM:’
Most systems will run “prefork” with mod_php, and “event” for php-fpm
Add mod_cloudflare to DirectAdmin
Relating to this guide, you can install the mod_cloudflare module into apache if you need it.
On a DirectAdmin box, we will use the httpd-includes.conf file, as it is not modifying by CustomBuild once it’s set.
- Once apache is up and running, download and install the mod_cloudflare module:
apxs -i -c mod_cloudflare.c
- Next, add the module to the httpd-includes.conf:
echo “LoadModule cloudflare_module /usr/lib/apache/mod_cloudflare.so” >> /etc/httpd/conf/extra/httpd-includes.conf
- and finally restart apache:
service httpd restart
CageFS with awstats: Can’t open perl script “/usr/local/awstats/tools/awstats_buildstaticpages.pl”: No such file or directory
If your awstats that are not working with CageFS and you are getting an error like this when testing it manually:
[root@server scripts]# ./awstats_process.sh user domain.com
Conversion not required. Continuing normally
Can’t open perl script “/usr/local/awstats/tools/awstats_buildstaticpages.pl”: No such file or directory
it likely means the data has not been copying over to the skeleton folder in
To get around that, edit:
and add 2 values, so beginning of the line looks like this, assuming :
paths=/usr/local/awstats/, /usr/local/awstats-7.7/, /usr/local/awstats, /usr/local/php….
where the bold bits are new.
which should copy the everything over to the cagefs-skeleton/usr/local path. Just confirm it:
[root@server scripts]# ll /usr/share/cagefs-skeleton/usr/local
lrwxrwxrwx 1 root root 11 Jun 26 22:57 awstats -> awstats-7.7
drwxr-xr-x 5 root root 4096 Mar 1 2016 awstats-7.7
- the literal awstats-7.7 directory
- the literal path to the awtstats link (without trailing slash)
If not sure if there was a change in CageFS, and older version of CafeFS, they have fixed a bug to prevent us from doing it the old way 🙂