maniu@securebrain.com:~# vi apache



# configure apache
./configure --prefix=/data/httpd-2.2.4 \
--enable-so \
--enable-unique-id \
--enable-usertrack \
--enable-mime-magic \
--enable-charset-lite \
--enable-mods-shared=all

# configure mysql
./configure \
--prefix=/data/mysql-5.0.33 \
--exec-prefix=/data/mysql-5.0.33 \
--enable-assembler \
--with-mysqld-ldflags=-all-static
# make; make install; 
# adduser/grp  mysql ; cd $prefix
# chown -R root  . ; chown -R mysql var ; chgrp -R mysql .
# mv my-large.cnf /etc/my.cnf
# $prefix/bin/mysql_install_db --user=mysql
# ./bin/mysqladmin -u root password 'new-password'
# test mysql: cd /data/mysql-5.0.33 ; /data/mysql/bin/mysqld_safe &
# cp share/mysql/mysql.server /etc/init.d/

# configure php
./configure --prefix=/data/php-5.2.0  --exec-prefix=/data/php-5.2.0 \
--with-apxs2=/data/apache2/bin/apxs \
--with-mysql=/data/mysql \
--with-mysql-sock=/tmp/mysql.sock \
--enable-fastcgi \
--enable-force-cgi-redirect \
--with-zlib \
--with-gettext \
--with-gdbm \
--with-config-file-path=/data/php-5.2.0 \
--enable-sockets
# make; make install ; copiare php.ini
# add in http.conf "AddType application/x-httpd-php .php .phtml"
# tests apache with touching my.php
<?php
phpinfo();
phpinfo(INFO_MODULES);
?">


---------------------------------------------------------------------------------


# sites-enable apache2 per auth radius/ssl con reverse proxy

<VirtualHost *:443>
ServerName name.virtual
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www
        <Directory proxy:https://proxy_dest_for/>
                Options FollowSymLinks
                Order allow,deny
                allow from all
        </Directory>


        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On


AddDefaultCharset UTF-8
RequestHeader unset accept-encoding
HostnameLookups Off
UseCanonicalName Off
ProxyPreserveHost On
SSLProxyEngine On
SSLProtocol All
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
<Location />
        AuthName "Private Area"
        ## Type of authentication to use.
        AuthType basic
        ## Address and the Shared Secret of the RADIUS Server to contact.
        AuthXRadiusAddServer "server:port" "key"
        ## Time in Seconds to wait for replies from the RADIUS Servers
        AuthXRadiusTimeout 1
        ## Number of times to resend a request to a server if no reply is received.
        AuthXRadiusRetries 2
        AuthXRadiusRejectBlank on
        ## This tells apache that we want a valid user and password.
        require valid-user
        ProxyPass  https://proxy_dest_for/
        ProxyPassReverse  https://proxy_dest_for/
</Location>
ErrorLog /var/log/apache2/owa_ssl_error_log
</VirtualHost>

# loadmodule mod_auth_xradius in httpd.conf 
LoadModule auth_xradius_module /usr/lib/apache2/modules/mod_auth_xradius.so
#AuthXRadiusCache none -
## A Local DBM Based Cache (low performance)
AuthXRadiusCache dbm "/tmp/auth_xradius_cache"
## Only a Single memcached Server
# AuthXRadiusCache memcache "127.0.0.1"
## Multiple memcached Servers
## Time in Seconds that an entry will be cached.
AuthXRadiusCacheTimeout 600
ServerTokens token





:q!