On Directadmin server httpd fails to start with below error : # service httpd restart Stopping httpd: [FAILED] Starting httpd: Syntax error on line 47 of /usr/local/directadmin/data/users/linuxbabu/httpd.conf: Invalid command ‘php_admin_flag’, perhaps misspelled or defined by a module not included in the server configuration Solution : Execute below commands to rebuild php and http config files.… Continue reading Directadmin :: httpd error Invalid command ‘php_admin_flag’
Category: DirectAdmin
How to verify matching private key with a certificate
The private key contains a series of numbers. Two of those numbers form the “public key”, the others are part of your “private key”. The “public key” bits are also embedded in your Certificate (we get them from your CSR). To check that the public key in your cert matches the public portion of your… Continue reading How to verify matching private key with a certificate
DirectAdmin : Apache won’t start after update on FreeBSD
An issue with php/apache is causing apache not to start in FreeBSD. It segfaults and core dumps, logged in the /var/log/httpd/error_log. Try removing –with-openssl from your configure.php file and recompile php. cd /usr/local/directadmin/customapache vi configure.php #remove –with-openssl from the file, save, exit. ./build clean ./build php n Possibly a mod_perl issue. Edit the /etc/httpd/conf/httpd.conf change:… Continue reading DirectAdmin : Apache won’t start after update on FreeBSD
How to track which site is using the apache processes.
For apache 1.3, edit your /etc/httpd/conf/httpd.conf and add ExtendedStatus On <Location /httpd-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> just after the code that says “ServerSignature On”. Save, exit, then restart apache. You can access the stats page by going to http://1.2.3.4/httpd-status where 1.2.3.4 is your server’s IP.… Continue reading How to track which site is using the apache processes.
Error: Cannot find SSL binaries under /usr
This happens with the configure script for apache cannot find the “openssl” (or “ssleay”) binaries in any of /usr/bin/openssl /usr/sbin/openssl /usr/apps/openssl The usual location for “openssl” is /usr/bin/openssl On a debian system, run apt-get install openssl
DirectAdmin : Apache stops responding but is running
A few things that could cause that are: Possible Causes: 1) MaxClients set to a value too low 2) If you have over about 800 sites, the ErrorLog files open too many file descriptors and apache won’t be able to log the errors and may stop responding. Solutions: 1) edit /etc/httpd/conf/httpd.conf and increase the MaxClients setting to something… Continue reading DirectAdmin : Apache stops responding but is running
DirectAdmin : Updating Apache to the latest version
Updating Apache to the latest version You can check the current version of apache by running httpd -v If you wish to update your 1.3 version of apache to the most recent, run the following: cd /usr/local/directadmin/customapache ./build clean ./build update ./build apache_mod_ssl If you’re using apache 2.x, use “./build apache_2” isntead of apache_mod_ssl. This… Continue reading DirectAdmin : Updating Apache to the latest version
DirectAdmin : Downgrade from apache 2 back to apache 1.3
How to downgrade from apache 2 back to apache 1.3 If you need to go back to apache 1.3 after installing apache 2, you’ll need to do the following: 1) Restore the old httpd.conf file: cp -f /etc/httpd/conf/httpd.conf.1.3.backup /etc/httpd/conf/httpd.conf 2) Get DirectAdmin to use the old httpd.conf files for the users. Edit the /usr/local/directadmin/conf/directadmin.conf file… Continue reading DirectAdmin : Downgrade from apache 2 back to apache 1.3
cgi files generate Internal Server Error
This means that the cgi script did not execute properly. There are several causes that can generate this error so a few things would need to be checked. 1) check the /var/log/httpd/suexec_log. It contains any errors that would be as a result of not having correct permissions on the file. The file needs to be… Continue reading cgi files generate Internal Server Error
Uninstall APF
Sometimes we may require to remove APF from the server. Here is a guide which shows how to remove APF completely from the server. Stop the firewall first service apf stop /bin/rm -rfv /etc/apf Remove the cron for APF /bin/rm -fv /etc/cron.daily/fw /bin/rm -fv /etc/init.d/apf lastly disable at startup chkconfig apf off This should remove… Continue reading Uninstall APF