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 VirtualHost entries (domains, subdomain, ssl, etc.. ), the ErrorLog files open too many file descriptors and apache won’t be able to log the errors and may stop responding.
This number can vary per box depending on the limit, and setup of the system. (lower/higher)
Solutions:
1) edit /etc/httpd/conf/httpd.conf and increase the MaxClients setting to something like 200 or 300.
2)
cd /usr/local/directadmin/data/templates
cp virtual_host*.conf custom
cd custom
# remove all the ErrorLog lines (or comment them out) from the 4 virtual_host*.conf files that are in the custom directory.
Source: http://directadmin.com/
Tags: Apache, responding, stops
Running CGI script from any directory
In order to force apache to allow cgi script to run, simply create a file called .htaccess inside the directory in which you wish to run the scripts. Insert the following text into the .htaccess file:
Options +ExecCGI
AddHandler cgi-script .cgi .pl
Tags: cgi, directory, Running, Script
Internal Server Error with cgi files
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.
2) The file needs to be in a cgi-bin and must have the owner/group as the username who owns the site.
3) The script must have execute permission.
4) The most common chmod permission is 755.
5) The easiest way to figure out script coding problems is to first run the script manually from an ssh prompt.
6) Other errors that would be generated when running the script manually from ssh would be missing perl modules.
7) Cpan is the easiest method to install new perl modules, eg:
perl -e shell -MCPAN
install Bundle::DBD::mysql
Tags: cgi, error, Files, Internal, server
How to modify the open_basedir setting for one domain in DirectAdmin
To change the open_basedir value when using php in CLI mode (not suPHP), you can do so by going to:
Admin Level -> Custom httpd configuration -> domain.com
In the top text area, insert this one line:
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/usr/local/lib/php/|
which is the default value in the templates. Edit the paths in that line to meet your needs.
Source : http://directadmin.com/
Tags: DirectAdmin Support, Domain, modify, open_basedir, Setting
DirectAdmin custom httpd.conf code to the VirtualHosts of a domain
DirectAdmin Allows Admin to insert extra httpd.conf code that a User may require. To access the control page for this functionality, go to Admin Panel -> Admin Settings -> Customize Httpd Configurations.
Once you see the list of domain, click the domain you wish to insert the extra httpd.conf code to.
Another common use is to add another ServerAlias. This allows another domain to be used to access the exact same content. To accomplish this, you would write
ServerAlias mynew-domain.com www.mynew-domain.com
To get mynew-domain.com and www.mynew-domain.com to point to the original domain for the VirtualHost. You will also have to make sure that mynew-domain.com and www.mynew-domain.com both resolve to the same IP.
Tags: code, Custom, DirectAdmin Support, Domain, httpd.conf, VirtualHosts