How to modify the open_basedir setting for one domain

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

Stopping and Restarting Apache

In order to stop or restart Apache, you must send a signal to the running httpd processes. There are two ways to send the signals. First, you can use the unix kill command to directly send signals to the processes. You will notice many httpd executables running on your system, but you should not send signals to any of them except the parent, whose pid is in the PidFile. That is to say you shouldn’t ever need to send signals to any process except the parent. There are three signals that you can send the parent: TERM, HUP, and USR1, which will be described in a moment.

To send a signal to the parent you should issue a command such as:

kill -TERM `cat /usr/local/apache2/logs/httpd.pid`

The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they’re not serving anything).

apachectl -k graceful

Sending the HUP or restart signal to the parent causes it to kill off its children like in TERM, but the parent doesn’t exit. It re-reads its configuration files, and re-opens any log files. Then it spawns a new set of children and continues serving hits.

Signal: HUP

apachectl -k restart

Note: Before doing a restart, you can check the syntax of the configuration files with the -t command line argument.


About Semaphore

About Semaphore

Semaphore a term used in UNIX for a variable which acts as a counter.

There may be times when two processes try to access the same file simultaneously. In this event we must control the access of the file when the other process is accessing. This is done by assigning value to semaphore.

Semaphore is stored in kernel so that it can be accessed by all processes.

Details of Semaphore

The command

$ ipcs –s

will give the list of existing semaphores.

To disable the SSL2.0 protocol and forcing 3.0

For apache 1.3, find the line:

#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

and change it to:

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:!SSLv2:+EXP:+eNULL

Note the 2 changes: a) remove the # character at the beginning of the line, and b) change +SSLv2 to !SSLv2

For apache 2.x, do the same thing, but instead it will be in the /etc/httpd/conf/ssl.conf file, or for the new apache system, /etc/httpd/conf/extra/httpd-ssl.conf (if you have both files, just change it in both).

Source : http://directadmin.com/

semget: No space left on device

This relates to semaphores on your system (you’ve run out). Run the following to clear them out:

ipcs | grep apache | awk ‘{print $2}’ > sem.txt

And then run the following.

for i in `cat sem.txt`; do { ipcrm -s $i; }; done;

« Prev - Next »