Thursday, August 1, 2013

How To Install Mod_Cloudflare On Apache For Ubuntu

sudo apt-get install apache2-prefork-dev
wget https://raw.github.com/cloudflare/CloudFlare-Tools/master/mod_cloudflare.c
apxs2 -iac mod_cloudflare.c
sudo service apache2 restart

Monday, July 8, 2013

Ubuntu remove sendmail

sudo apt-get remove sendmail sendmail-bin postfix
sudo apt-get purge postfix exim4 sendmail sendmail-bin
sudo reboot

VirtualHost 127.0.0.1:8080 overlaps with VirtualHost 127.0.0.1:8080

[warn] VirtualHost 127.0.0.1:8080 overlaps with VirtualHost 127.0.0.1:8080, the first has precedence, perhaps you need a NameVirtualHost directive

Apache listen only on 127.0.0.1 (Nginx front-end etc.) and host multiple subdomains in Apache
vi /etc/apache2/ports.conf

NameVirtualHost 127.0.0.1
Listen 127.0.0.1:80
Use this on vhosts
<virtualhost 127.0.0.1>
</virtualhost>

Thursday, May 30, 2013

Hide Apache Version in Ubuntu

edit /etc/apache2/conf.d/security
1)
ServerTokens OS
to
ServerTokens Prod

2)
ServerSignature On
to
ServerSignature Off

Tuesday, February 19, 2013

How do I add a decimal field in a Codeigniter Migration

public function up()
 {
  $this->dbforge->add_field(array(
   'Price' => array(
    'type' => 'DECIMAL',
    'constraint' => '10,2',
    'unsigned' => FALSE
   )
  ));

  $this->dbforge->create_table('ads');
 }

Tuesday, February 12, 2013

Wamp virtual hosts

Open C:\wamp\bin\apache\apache2.2.22\conf\httpd.conf
Uncomment
#Include conf/extra/httpd-vhosts.conf
it will be
Include conf/extra/httpd-vhosts.conf

Open C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf to add/edit virtual hosts

Sample
NameVirtualHost *:80


    DocumentRoot "c:/wamp/www/"
    ServerName localhost
    ServerAlias www.localhost

Windows how to switch php version between 5.2 and 5.3



now you can switch php version




** WARNING : You must install Visual C++ 2010 SP1 Redistributable Package x86 or x64

VC10 SP1 vcredist_x86.exe 32 bits : http://www.microsoft.com/download/en/details.aspx?id=8328