Levent Ozturk
Enter
Ubuntu Apache

sudo service apache2 restart

apache cgi support

vi /etc/apache2/apache2.conf =>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ Options Indexes FollowSymLinks Options +ExecCGI #AllowOverride None Require all granted AddHandler cgi-script cgi pl ls -l /etc/apache2/mods-enabled/cgi.load sudo a2enmod cgi # enable cgi (perl,php,..) apt-get install libwww-perl dpkg-query -S libwww-perl #check if installed for LWP perl -e shell -MCPAN #Tool to instal/update CPAN modules install XML::Parser Apache access my home driectory: (www-data is the apache user) sudo adduser $USER www-data sudo chown -R www-data:www-data /home/$USER/public_html sudo chmod -R 775 /home/$USER/public_html Also add the directory to the site conf file -----------------------------

-------------------------------------------------------------- APACHE SSL:

dpkg -S mod_ssl.so

a2enmod ssl

DocumentRoot /var/www/website

ServerName www.domain.com

SSLEngine on

SSLCertificateFile /etc/ssl/crt/primary.crt

SSLCertificateKeyFile /etc/ssl/crt/private.key

SSLCertificateChainFile /etc/ssl/crt/intermediate.crt

Keep for both http and https

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

Apache Web socket support:

https://github.com/disconnect/apache-websocket/blob/master/README.md

git clone git://github.com/disconnect/apache-websocket.git # will download to the current folder

cd apache-websocket

apt-get install apache2-dev # apxs2 is needed to compile extra modules

apxs2 -i -a -c mod_websocket.c apxs2 -i -a -c mod_websocket_draft76.c

cp ./.lib//mod_websocket.so /usr/lib/apache2/modules/mod_websocket.so

vi /etc/apache2/mods-available/websocket.load =>

LoadModule websocket_module /usr/lib/apache2/modules/mod_websocket.so

vi /etc/apache2/sites-available/.conf =>

SetHandler websocket-handler WebSocketHandler /.libs/mod_websocket_echo.so echo_init

service apache2 restart

apxs2 -i -a -lmysqlclient -lm -lz -c mod_websocket_echo.c # This is the sw to be called when there is an ws request to /echo directory. It also includes mysql library

apxs2 -i -a -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz -c mod_websocket_echo.c # If the my sql lib is not found Additional Compiler Options

===========================

You can specify the following compile time options with the -D parameter to set default values for many of the configuration paramters (see CONFIGURATION for descriptions of the options)

Example: apxs -c -DHOST=localhost -lmysqlclient -lm -lz mod_auth_mysql.c http://modauthmysql.sourceforge.net/BUILD Configuration Parameter Option Valid Values (1)(2)

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

AuthMySQLHost HOST "localhost", host name or ip address AuthMySQLPort PORT integer port number AuthMySQLSocket SOCKET full path name of UNIX socket to use AuthMySQLUser USER MySQL user id AuthMySQLPassword PASSWORD MySQL password AuthMySQLDB DB MySQL database AuthMySQLPwTable PWTABLE MySQL table to use AuthMySQlNameField NAMEFIELD MySQL column name AuthMySQLPasswordField PASSWORDFIELD MySQL column name AuthMySQLPwEncryption ENCRYPTION (3) "none", "crypt", "scrambled", "md5", "aes", "sha1" AuthMySQLSaltField SALT "<>", or MySQL column name AuthMySQLKeepAlive KEEPALIVE "0", "1" AuthMySQLAuthoritative AUTHORITATIVE "0", "1" AuthMySQLNoPassword NOPASSWORD "0", "1" AuthMySQLEnable ENABLE "0", "1" AuthMySQLCharacterSet CHARACTERSET MySQL character set to use Password protection:

sudo apt-get install apache2 apache2-utils

sudo htpasswd -c /etc/apache2/.htpasswd.

sudo htpasswd /etc/apache2/.htpasswd. <Directory ""> AuthType Basic AuthName "Restricted Content" AuthUserFile /etc/apache2/.htpasswd. Require valid-user

All the material listed and linked at this World Wide Web domain are strictly private property and copyrighted. © Copyright -∞-∞ Levent Ozturk. All rights reserved. Reproduction or use of any material, documents and related graphics and any other material from this World Wide Web server is strictly prohibited. Site Map