Discussion about CustomBuild

Updated #6. Added 3 new options: uebimiau, mysql_backup and versions.
 
broken apache after using daplugin.build script

I used the daplugin.build script to build fast cgi, apparently that script changed a lot of things. Result = broken apache on a live server, not smart I know but whats done is done.

I figured I could restore apache as it was by simply using custom builds script.
This is what I get right in the beginning

PHP:
./build: line 4874: /usr/local/directadmin/data/users/admin/httpd.conf: No such file or directory
chown: `diradmin:admin': invalid group
chmod: cannot access `/usr/local/directadmin/data/users/admin/httpd.conf': No such file or directory

It will continue to compile though. But at the end apache wont start and I cant find logs as to why it wont start. Any suggestions?
 
Do:
Code:
touch /usr/local/directadmin/data/users/admin/httpd.conf
chown admin:admin /usr/local/directadmin/data/users/admin/httpd.conf

And try again.
 
Do:
Code:
touch /usr/local/directadmin/data/users/admin/httpd.conf
chown admin:admin /usr/local/directadmin/data/users/admin/httpd.conf

And try again.

Its been so long since i installed DA, but the DA Admin user is not admin, because I have changed it to something else. My admin user is called retro

Also the group admin doesnt exist.

in /usr/local/directadmin/data/users/retro the httpd.conf exists


also ive been able to get some logs (i copied an old httpd.conf to /usr/local/directadmin/admin/httpd.conf)

PHP:
[Tue Mar 04 03:58:13 2008] [warn] Init: SSL server IP/port conflict: www.ananyah.com:443 (/usr/local/directadmin/data/users/ananyah/httpd.conf:43) vs. www.alraeeseco.com:443 (/usr/local/directadmin/data/users/wmraes/httpd.conf:43)
[Tue Mar 04 03:58:13 2008] [warn] Init: SSL server IP/port conflict: www.alrouyah.com:443 (/usr/local/directadmin/data/users/alrouweb/httpd.conf:43) vs. www.alraeeseco.com:443 (/usr/local/directadmin/data/users/wmraes/httpd.conf:43)
[Tue Mar 04 03:58:13 2008] [warn] Init: SSL server IP/port conflict: www.alalsun.net:443 (/usr/local/directadmin/data/users/alalsun/httpd.conf:43) vs. www.alraeeseco.com:443 (/usr/local/directadmin/data/users/wmraes/httpd.conf:43)
[Tue Mar 04 03:58:13 2008] [warn] Init: SSL server IP/port conflict: localhost:443 (/etc/httpd/conf/extra/httpd-vhosts.conf:38) vs. www.alraeeseco.com:443 (/usr/local/directadmin/data/users/wmraes/httpd.conf:43)
[Tue Mar 04 03:58:13 2008] [warn] Init: You should not use name-based virtual hosts in conjunction with SSL!!
[Tue Mar 04 03:58:13 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Mar 04 03:58:13 2008] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock
Configuration Failed
[Tue Mar 04 03:59:02 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 03:59:02 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 03:59:02 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 03:59:02 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 03:59:02 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?

Also in reference to the no space left on device error here is the df output

PHP:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             228G   81G  135G  38% /
tmpfs                 443M     0  443M   0% /lib/init/rw
tmpfs                 443M     0  443M   0% /dev/shm
/dev/sda1             265M   14M  238M   6% /boot
 
Last edited:
build file

im looking at the build file an noticed that it has references to the user diradmin and the group admin should i change those to diradmin:retro?

PHP:
ADMNHTTP=/usr/local/directadmin/data/users/admin/httpd.conf
        if [ ! -e ${ADMNHTTP} ]; then
                echo -n "" > ${ADMNHTTP}
                chown diradmin:condor ${ADMNHTTP}
                chmod 640 ${ADMNHTTP}
        fi
 
Ok I have switched to apache 2.0

PHP:
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Mar 04 05:59:13 2008] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock

apache wont start, the above is the error log.
 
Ok I have switched to apache 2.0

PHP:
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [warn] RSA server certificate CommonName (CN) `www.liquidmemory.net' does NOT match server name!?
[Tue Mar 04 05:59:13 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Mar 04 05:59:13 2008] [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock

apache wont start, the above is the error log.


If i edit /etc/httpd/conf/httpd.conf and uncomment LoadModule php5_module /usr/lib/apache/libphp5.so


PHP:
core:/usr/local/directadmin/custombuild# /etc/init.d/httpd start
Starting httpd: Syntax error on line 17 of /etc/httpd/conf/httpd.conf:
API module structure 'php5_module' in file /usr/lib/apache/libphp5.so is garbled - expected signature 41503230 but saw 41503232 - perhaps this is not an Apache module DSO, or was compiled for a different Apache version?

I get the above as well.

Im lost, tired, headache from staring at the terminal, and would appreciate any help.
 
Update: suPHP problem

PHP:
Syntax error on line 32 of /usr/local/directadmin/data/users/alalsun/httpd.conf:
Invalid command 'suPHP_Engine', perhaps mis-spelled or defined by a module not included in the server configuration

No matter how many times i rebuild suphp, this wont go away.
Update: the above can be solved by editing httpd.conf uncommenting the line that loads the suphp module (duh!!!) lol
Ive sorted out all my other problems, and id say my steps have been well documented here.

Apache is up and running again.

Also another thing that I forgot is that I had custom templates, dunno where they came from, but they were there, i deleted them and problems finally solved. *releases a sigh of relief* http://www.directadmin.com/forum/showpost.php?p=123964&postcount=2

here are my pending problems:

I cant restart apache unless I do the following:
killall -9 httpd
PHP:
ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
got this from: http://carlosrivero.com/fix-apache---no-space-left-on-device-couldnt-create-accept-lock

that trick solved the lock problem mentioned in my earlier posts (No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed)

PHP:
[Tue Mar 04 10:06:04 2008] [warn] pid file /var/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

According to phpinfo()
PHP:
Configuration File (php.ini) Path 	/usr/local/etc/php5/cgi
Loaded Configuration File 	/usr/local/etc/php5/cgi/php.ini

However when i tell php to load the extension phpexpress, apache will start but not process any php at all. In fact it will spit out a 500 error.

Temp for now I have disabled the extension, gonna get some rest and hopefully during that time someone might have another clever idea for me to try
 
Last edited:
PHP5 IMAP Support

I tried to edit the file
Just a quick question- Why doesn't custombuild use --with-imap ? How do I get imap installed with the new custombuild script?

Adam

Yeah, is there any file we can edit and recompile to obtain IMAP support?
 
I tried to edit the file

Yeah, is there any file we can edit and recompile to obtain IMAP support?

Long ago (2006 maybe) imap wasnt supported by custom build.
Not sure if this has changed, if it has would be nice to know how to do it.
 
suPHP and default group apache

I'm surprised I cant find anyone else with this problem in the forum or this thread - or I might just have gone blind from all the searching.

I've used custombuild to set up PHP5 with suPHP.

Because the default group of the customers public_html folder is apache, the files uploaded get the same group. When an uploaded PHP-file get the group apache, suPHP denies access to the file;
suPHP log: Mismatch between target GID (1023) and GID (1004) of file

To solve the problem I can manually change the PHP-files group to the users own group, but this is not an option for my customers.

Since FTP uploads as the same group as public_html folder (that is with the group apache). One solution is to change the public_html group to [users-group], and then set the chmod to 755 so apache still is allowed to see the files.

Can this be done so it is default for new users?
Or is there any better solutions to this problem?
 
Having some issues with PHP4 as CLI and PHP5 as CGI.
I'm getting the following errors in error_log:

Code:
[Mon Mar 10 21:50:04 2008] [notice] child pid 31716 exit signal Segmentation fault (11)

An strace shows this:

Code:
Process 31716 attached - interrupt to quit
select(30, [28 29], NULL, NULL, NULL)   = 1 (in [29])
accept(29, {sa_family=AF_INET, sin_port=htons(1647), sin_addr=inet_addr("84.104.51.223")}, [16]) = 3
semop(8388608, 0x80cef46, 1)            = 0
rt_sigaction(SIGUSR1, {SIG_IGN}, {0x80600db, [], SA_RESTORER|SA_INTERRUPT, 0x418908}, 8) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("83.98.159.50")}, [16]) = 0
setsockopt(3, SOL_TCP, TCP_NODELAY, [1], 4) = 0
brk(0x8ac5000)                          = 0x8ac5000
read(3, "GET / HTTP/1.1\r\nAccept: image/gi"..., 4096) = 641
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
time(NULL)                              = 1205182204
stat64("/home/testphp/domains/domain.com/public_html", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/.htaccess", O_RDONLY)            = -1 ENOENT (No such file or directory)
open("/home/.htaccess", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/home/testphp/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/testphp/domains/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/testphp/domains/domain.com/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/testphp/domains/domain.com/public_html/.htaccess", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/testphp/domains/domain.com/public_html/index.html", {st_mode=S_IFREG|0644, st_size=622, ...}) = 0
stat64("/home/testphp/domains/domain.com/public_html/index.html", {st_mode=S_IFREG|0644, st_size=622, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
chdir("/etc/httpd")                     = 0
rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
kill(31716, SIGSEGV)                    = 0
sigreturn()                             = ? (mask now [])
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
Process 31716 detached

I'm in the blue here.
 
It seemed that the PHP 4 module was loaded 2 times. It gave a warning while starting Apache. I ignored it in the beginning, because perl has it as well and didn't cause any issues.

Removing the second instance solved our issues.
 
Hi, first of all, really nice script :)

I try to update my MySQL but the server reply me a 404 error.

[root@220915 custombuild]# ./build mysql
Dumping database 220915.ds.nac.net.err: mysqldump: Got error: 1102: Incorrect database name '220915.ds.nac.net.err' when selecting the database
Dumping database 220915.ds.nac.net.pid: mysqldump: Got error: 1102: Incorrect database name '220915.ds.nac.net.pid' when selecting the database
Dumping database da_roundcube: Dumping database ibdata1: Dumping database ib_logfile0: Dumping database ib_logfile1: Dumping database mysql: Dumping database mysql.sock: mysqldump: Got error: 1102: Incorrect database name 'mysql.sock' when selecting the database
Dumping database solarius_test: --13:13:18-- http://files.directadmin.com/services/all/mysql/MySQL-client-5.1.23-rc-0.i386.rpm
Resolving files.directadmin.com... 72.35.85.222
Connecting to files.directadmin.com|72.35.85.222|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
13:13:18 ERROR 404: Not Found.

When the file will be available :) thx alot
 
Hello,

5.1 will be avaiable once mysql finally releases it as stable.
It's still labelled as a "release candidate".

John
 
Back
Top