mkdir /etc/httpd/conf/ssl.key
mkdir /etc/httpd/conf/ssl.crt
/usr/bin/openssl req -x509 -newkey
rsa:1024 -keyout /etc/httpd/conf/ssl.key/server.key -out /etc/httpd/conf/ssl.crt/server.crt -days
9999 -nodes -config ./configure/ap2/cert_config
LoadModule suphp_module /usr/lib/apache/mod_suphp.so
httpd: Syntax error on line 296 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-php-handlers.conf: Cannot load /usr/lib/apache/mod_suphp.so into server: /usr/lib/apache/mod_suphp.so: cannot open shared object file: No such file or directory
default_php=5
php4_cli=no
php4_cgi=yes
php5_cli=yes
php5_cgi=no
apache_ver=2.2
dovecot=no
cd /var/www/html/webmail;ln -s /var/www/html/squirrelmail squirrelmail
Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: test.php5
If you think this is a server error, please contact the webmaster.
Error 500
LoadModule suphp_module /usr/lib/apache/mod_suphp.so
<IfModule mod_suphp.c>
AddHandler x-httpd-php .inc .php .php3 .php5 .phtml
AddHandler x-httpd-php .php4
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php5/cgi/
suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php4
</Location>
</IfModule>
default_php=5
php4_cli=no
php4_cgi=yes
php5_cli=yes
php5_cgi=no
apache_ver=2.2
dovecot=no
mrhat:/usr/local/directadmin/custombuild# /usr/local/directadmin/custombuild/phpopt
/usr/local/directadmin/custombuild/phpopt: line 1: 2: command not found
cat /usr/local/directadmin/custombuild/phpopt
and not /usr/local/directadmin/custombuild/phpopt I need an ouput of these files too: /usr/local/suphp/etc/suphp.conf and /etc/httpd/conf/extra/httpd-suphp.confCode:cat /usr/local/directadmin/custombuild/phpopt
P.S. make sure that you're running the latest version of custombuild script (rc2)
2
[global]
;Path to logfile
logfile=/var/log/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=apache
;Path all scripts have to be in
docroot=/
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
;Minimum UID
min_uid=100
;Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-php4=php:/usr/local/php4/bin/php
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
currently rebuilding :( sry
suPHP_AddHandler x-httpd-php4
If you have:
Code:suPHP_AddHandler x-httpd-php4
In /etc/httpd/conf/extra/httpd-suphp.conf then everything should be okay, but I found one more mistype.. If you have AddHandler x-httpd-php .php4 change it to AddHandler x-httpd-php4 .php4
mrhat:/usr/local/directadmin/custombuild# cat /etc/httpd/conf/extra/httpd-suphp.conf
LoadModule suphp_module /usr/lib/apache/mod_suphp.so
<IfModule mod_suphp.c>
AddHandler x-httpd-php .php4
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php5/cgi/
suPHP_AddHandler x-httpd-php4
</Location>
</IfModule>
Error message:
Premature end of script headers: test.php4
default_php=4
php4_cli=yes
php4_cgi=no
php5_cli=no
php5_cgi=yes
apache_ver=2.2
dovecot=no
<IfModule mod_php4.c>
AddHandler application/x-httpd-php .inc .php .php4 .phtml
AddHandler application/x-httpd-php-source .phps
</IfModule>
#<IfModule mod_php4.c>
AddHandler application/x-httpd-php .inc .php .php4 .phtml
AddHandler application/x-httpd-php-source .phps
#</IfModule>