Tag: freebsd

Updating Apache to the latest version

by admin on Sep.08, 2009, under DirectAdmin

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" instead of apache_mod_ssl.
This should update both the configure options and the version of apache to the most recent version. Once the update has completed, you’ll need to restart apache:
RedHat:

/sbin/service httpd restart

FreeBSD:

/usr/local/etc/rc.d/httpd restart

Leave a Comment :, , , , more...

Cannot use SSH with old system accounts after Installation

by admin on Sep.08, 2009, under DirectAdmin

For all SSH accounts created with DirectAdmin, it adds the "AllowUsers" option to the /etc/ssh/sshd_config file. When DirectAdmin is installed, it will add "root" and "admin" to that file under the AllowUsers option. Any other users who have had SSH account on the system will also require to be added to that file in order to access the server via SSH.
*IMPORTANT: For systems who require the use of "su" to access the root account, but do not use "admin" to do it, that usename *must* be added to the /etc/ssh/sshd_config before logging out or else they will not be able to login and and turn won’t be able to su to root any longer. This isn’t as relevant for RedHat systems, because the default is to enable root login, but for most FreeBSD systems, su is required, and the starting use *must* be in the wheel group, which a newly created "admin" would not be.

Leave a Comment :, , , , more...

Change apache to do graceful restarts

by admin on Sep.07, 2009, under DirectAdmin

If you want to avoid download interruptions during apache restarts, apache has to be changed to restart gracefully.
To do that, you’ll need to change your httpd boot script.
The path for your script will vary depending on your OS.
For FreeBsd it’s:
/usr/local/etc/rc.d/httpd
For all other OS’s, it’s:
/etc/init.d/httpd
As for the actual change, you’ll edit the httpd boot script for your system, find this code:

restart)
  stop
  waitforexit "httpd" 20
  start
  ;;

and change it to read:

restart)
  kill -USR1 `cat $PIDFILE`
  ;;

Note, this is not tested as much, so you’ll need to keep an eye on things until you’re satisfied that it’s stable.
An apache restart will no longer start apache if it’s stopped. You must "start" it, as the graceful restart only works on already running processes.

Leave a Comment :, , more...

Apache won’t start after update on FreeBSD

by admin on Sep.07, 2009, under DirectAdmin

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:

AddModule mod_perl.c

to

#AddModule mod_perl.c

and then restart apache. If you don’t have "AddModule mod_perl.c", then don’t worry about this entry.
Remove the "LoadModule perl_module /usr/lib/apache/mod_perl.so" if you have it as well.
This won’t affect files in the cgi-bin (I’ve seen very few people actually making use of mod_perl itself).
more info:
Previous workaround for the problem is to remove thp php flags from the httpd.conf files:

cd /usr/local/directadmin/data/templates
cp virtual_host*.conf custom
cd custom
perl -pi -e ’s/php_admin/#php_admin/’ *
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/usr/local/etc/rc.d/httpd restart

One user reported that installing zend solved this problem as well, so try:

cd /usr/local/directadmin/customapache
./build zend

Possibly have to downgrade zend to 2.5.7 from 2.6.2 as well as the zend binaries may not be backwards compatible.
To downgrade to apache 1.3.33 and php 4.3.11, run:

cd /usr/local/directadmin/customapache
./build clean
perl -pi -e ’s/1.3.34/1.3.33/’ build
perl -pi -e ’s/1.3.34/1.3.33/’ configure.apache_ssl
perl -pi -e ’s/2.8.25/2.8.24/’ build
perl -pi -e ’s/4.4.1/4.3.11/’ build
./build update_data
./build all d

Leave a Comment :, , , , , more...

Apache won’t restart: [crit] (98)Address already in use: make_sock: could not bind to port 8090

by admin on Sep.07, 2009, under DirectAdmin

Note this is an old guide. It was for apache 1.3 with customapache. The current boot script we provide shouldn’t have this issue.
If apache is not completely shutting down, consider trying graceful restarts (see related link below) and also ensure your system is updated such that you don’t have any outdated php scripts on the server.


[crit] (98)Address already in use: make_sock: could not bind to port 8090
or
[crit] (98)Address already in use: make_sock: could not bind to port 443
or
[crit] (98)Address already in use: make_sock: could not bind to port 80
If you see this error in your /var/log/httpd/error_log, it would mean that apache isn’t shutting down completely before trying to restart. This means that the new process won’t be able to bind to the given ports because they’re still being used by the old copy of apache that wasn’t completely shut down.
To solve this, use a different boot script that will wait for all apache processes to stop before starting the new one:

cd /usr/local/directadmin/customapache
rm -f httpd*
./build update

Once you have the new scripts downloaded, you need to install them:
RedHat:

cp httpd /etc/init.d/httpd
chmod 755 /etc/init.d/httpd
chkconfig httpd reset

FreeBSD:

cp httpd_freebsd /usr/local/etc/rc.d/httpd
chmod 755 /usr/local/etc/rc.d/httpd

Leave a Comment :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Kontak

Budhi Indah A 31
Cimindi Cimahi 40514
West Java
Indonesia

Phone/SMS :
Info/Bantuan : 62-8158-6270622
Billing/konfirmasi : 62-8888-763551

Self Advertise


My site is worth $7548.2.
How much is yours worth?