Posts Tagged With: apache

Install LAMP Stack on Ubuntu/Debian

Tagged with: , , , , , , , , ,

Install LAMP Stack on Ubuntu/Debian using apt-get


sudo apt-get install openssh-server openssh-client apache2 libapache2-mod-php5 php5-cli php5-common php5-cgi  mysql-client mysql-common mysql-server php5-mysql php5-sqlite php5-gd phpmyadmin
1 Comment »

Stress Test Apache with ab

Tagged with: , , , , ,

Stress test your apache web server with the ap tool…


ab -n 200 -c 50 http://localhost/

n = number of request, c = concurrent reqests

1 Comment »

Remove www From URL using .htaccess in Apache

Tagged with: , , , , ,

This htaccess code will remove the ‘www’ part from the url. It uses the mod_rewrite module of apache to re-write the url – so make sure that’s installed.


RewriteEngine On 
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
5 Comments »

Directory Listing Only Search

Tagged with: , , , , , ,

The search that limits the results to just directory listings…

intitle:”index.of” inanchor:”Last Modified” inanchor:”Description” inanchor:”Parent Directory” -filetype:php -filetype:asp -filetype:htm -filetype:html -inurl:”index.of” search.string

No Comments »

Compile and Install LAMP Server from Source – PHP5, Apache2, MySQL5

Tagged with: , , , , , , , ,

MySQL

./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-mysqld-user=mysql --with-unix-socket-path=/tmp/mysql.sock --without-comment --without-debug --without-bench
make
make install

cp support-files/my-medium.cnf /etc/my.cnf
chown root:sys /etc/my.cnf
chmod 644 /etc/my.cnf
chown -R root:mysql /usr/local/mysql
chown mysql:mysql /var/lib/mysql

./scripts/mysql_install_db

cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &
/usr/local/mysql/bin/mysql

Apache

./configure --prefix=/usr/local/apache --enable-so --enable-cgi--enable-info --enable-rewrite --enable-speling --enable-usertrack --enable-deflate --enable-ssl --enable-mime-magic
make
make install

PHP

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --disable-debug --enable-ftp --enable-inline-optimization --enable-magic-quotes --enable-mbstring --enable-mm=shared --enable-safe-mode --enable-track-vars --enable-trans-sid --enable-wddx=shared --enable-xml --with-dom --with-gd --with-gettext --with-mysql=/usr/local/mysql --with-regex=system --with-xml --with-zlib-dir=/usr/lib --with-gettext --with-gdbm

make
make install
cp -p php.ini-recommended /usr/local/php/php.ini

Configuration

httpd.conf
php.ini
1 Comment »