New build system (BETA)

Also question:

if only use php as cgi, do script to do:

chown apache:apache /var/www/html -R
(phpmyadmin/squirrelmail/webmail and so on, they work ...)

and also users home directories ?

chown user:user /home/user/public_html -R

But if have mode than one domains, should go all /home/user/domains/.../public_html
 
Also question:

if only use php as cgi, do script to do:

chown apache:apache /var/www/html -R
(phpmyadmin/squirrelmail/webmail and so on, they work ...)

and also users home directories ?

chown user:user /home/user/public_html -R

But if have mode than one domains, should go all /home/user/domains/.../public_html

It's not a script issue, and it's insecure to chown all the files to apache user. Maybe from the next release of DirectAdmin it won't be owned by root.
 
dovecot continued

Hello,

That's me, your dovecot maniac again. :)

Here's smth I noticed with build (again, fresh install, Debian Etch):
Code:
da7:/usr/local/directadmin/custombuild# ./build dovecot
Converting to dovecot (1.0.0) ...
patching /etc/exim.conf to maildir
./build: line 3334: 

############## ###############
/usr/local/directadmin/custombuild/exim.conf.dovecot.patch: No such file or directory
############ here ^ #############

Adding dovecot=1 to the directadmin.conf ...
Shutting down exim:
spamd: no process killed
Starting exim:
Stopping DirectAdmin: [ OK ]


Don't know if that's a problem. Not for me probably - only wusses don't write their own exim.conf file. ;)
 
Hello,

That's me, your dovecot maniac again. :)

Here's smth I noticed with build (again, fresh install, Debian Etch):
Code:
da7:/usr/local/directadmin/custombuild# ./build dovecot
Converting to dovecot (1.0.0) ...
patching /etc/exim.conf to maildir
./build: line 3334: 

############## ###############
/usr/local/directadmin/custombuild/exim.conf.dovecot.patch: No such file or directory
############ here ^ #############

Adding dovecot=1 to the directadmin.conf ...
Shutting down exim:
spamd: no process killed
Starting exim:
Stopping DirectAdmin: [ OK ]


Don't know if that's a problem. Not for me probably - only wusses don't write their own exim.conf file. ;)

I guess you don't have dovecot=yes in options.conf file.
 
Code:
default_php=5
php4_cli=yes
php4_cgi=no
php5_cli=no
php5_cgi=yes
apache_ver=2.2
dovecot=no
Code:
Starting httpd: httpd: Syntax error on line 20 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib/apache/libphp5.so into server: /usr/lib/apache/libphp5.so: cannot open shared object file: No such file or directory
                                                           [FAILED]

Code:
LoadModule php4_module /usr/lib/apache/libphp5.so
#LoadModule php5_module /usr/lib/apache/libphp5.so
LoadModule suphp_module /usr/lib/apache/libphp5.so

Seems have problem with these couple lines.
 
when use compile php4 cli and php5 cgi, php4 files still not being pharse correctly, need comment out the ifmodule in httpd-php-handlers.conf.
Code:
<IfModule mod_php4.c>
AddHandler application/x-httpd-php .inc .php4 .phtml
AddHandler application/x-httpd-php-source .phps
</IfModule>

Code:
#<IfModule mod_php4.c>
AddHandler application/x-httpd-php .inc .php4 .phtml
AddHandler application/x-httpd-php-source .phps
#</IfModule>
 
httpd-vhosts.conf has problem, it's using 127.0.0.1 in VirtualHost, should use server IP.
Code:
<VirtualHost 127.0.0.1:80>
    ServerAdmin webmaster@localhost
    AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
    DocumentRoot /var/www/html
    ServerName localhost"
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/"
    CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost 127.0.0.1:443>
    ServerAdmin webmaster@localhost
    AliasMatch ^/~([^/]+)(/.*)* "/home/$1/public_html$2"
    DocumentRoot /var/www/html
    ServerName localhost
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>
 
It's not a script issue, and it's insecure to chown all the files to apache user. Maybe from the next release of DirectAdmin it won't be owned by root.

Yeah, but better that root user owner files /var/www/html (phpMyAdmin, squirrelmail, webmail)

And then also need change Minium UID ja GID to 0 suphp.conf
 
BUILDSCRIPT_VER=1.0.3 & DEBIAN 3.1

options.conf
default_php=4
php4_cli=no
php4_cgi=yes
php5_cli=no
php5_cgi=yes
apache_ver=1.3
dovecot=no

Still bug ! not correct in /etc/httpd/conf/extra/httpd-suphp.conf

/etc/init.d/httpd restart

Starting httpd: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-suphp.conf:
Cannot add module via name 'mod_suphp.c': not in list of loaded modules


Just in /etc/httpd/conf/extra/httpd-suphp.conf remove this line:

AddModule mod_suphp.c

then apache start ok!

In build script have this:

if [ "${APACHE_OPT}" = "1.3" ]; then
echo "AddModule mod_suphp.c" >> ${SUPHP_HTTPD}
fi


Also --with-openssl not added to suphp php4/php5 configuration files:
/usr/local/directadmin/custombuild/configure/suphp
-> configure.php4
-> configure.php5
 
Last edited:
BUILDSCRIPT_VER=1.0.3 & DEBIAN 3.1

options.conf


Still bug ! not correct in /etc/httpd/conf/extra/httpd-suphp.conf

/etc/init.d/httpd restart

Starting httpd: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-suphp.conf:
Cannot add module via name 'mod_suphp.c': not in list of loaded modules


Just in /etc/httpd/conf/extra/httpd-suphp.conf remove this line:

AddModule mod_suphp.c

then apache start ok!

In build script have this:




Also --with-openssl not added to suphp php4/php5 configuration files:
/usr/local/directadmin/custombuild/configure/suphp
-> configure.php4
-> configure.php5

I forgot to remove this from the build script:
Code:
		if [ "${APACHE_OPT}" = "1.3" ]; then
			echo "AddModule mod_suphp.c" >> ${SUPHP_HTTPD}
		fi
		echo "LoadModule suphp_module /usr/lib/apache/mod_suphp.so" >> ${SUPHP_HTTPD}

It's not needed anymore. You can delete both LoadModule and AddModule entries from /etc/httpd/conf/extra/httpd-suphp.conf .
 

Yeah, that user ok, and then it secure too !

But also when using this custombuild script to old DA server, where have 100-200 users/domain, and now wanna run only suphp !

why this script not also chown every user home / public_html directory to own user uid/guid ?

just feature more lie ./build chown_users or some thing like that

#!/bin/sh

OS=`uname`

for i in `ls /home`; do

if [ -e /home/$i/public_html ]; then

if [ $OS = "FreeBSD" ]; then
curo=`id -un \`stat -f '%u' /home/$i/public_html\``
else
curo=`stat -c '%U' /home/$i/public_html`
fi

if [ $? -ne 0 ]; then
echo "$i: skipping; failed to find owner of /home/$i/public_html"
else
if [ "$curo" != "$i" ]; then
chown -R $i:$i /home/$i/public_html
fi
fi
fi

done

So every user public_html/* directory apache:apache user owner reset back to users, because wanna use only suphp !

Just like file manager have this:
(Ability to reset the ownership of apache owned files in Filemanager)
http://www.directadmin.com/features.php?id=750
 
Last edited:
User can chown the files by himself, you can provide this script as a 3rd party. I'm not going to include it into the custombuild script, because some users need files owned by apache, e.g. if they're just trying suPHP (after it they'll go back to CLI) or if they have both CLI and CGI versions. Thank you.
 
Seems that now that we've commented out mod_frontpage, users can't use FP to upload...had a new user complain that they enabled FP (and the _vti* files are there), but getting error saying FP extensions are not enabled.

I'm thinking it has to be because mod_frontpage is no longer being loaded...thoughts?

(I hate Frontpage):mad:
 
sullise, I'll think about the frontpage (if we really need this EOL module) module. Do you want to see it in the custombuild script? (mod_frontpage alternative mod_dav is included)
 
Personally, I just want to see all FP users evaporate..lol.

But that not being feasible, just need it so that it works and they stop opening tickets.
 
Back
Top