Skip to main content

Posts

How to fix Apache – "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName" Error on Ubuntu

While restarting the Apache server on Ubuntu, I have this problem. pratama@pratama:~$ sudo /etc/init.d/apache2 restart * Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName To fix that problem, I need to edit the httpd.conf file. Open the terminal and type, sudo nano /etc/apache2/httpd.conf By default httpd.conf file will be blank. Now, simply I add the following line to the file. ServerName PratamaServer Then I save the file (Ctrl+O) and exit (Ctrl+X) from nano. Finally restart the server. sudo /etc/init.d/apache2 restart

Enable compression on Apache Centos/Fedora

Make sure your mod_deflate is enable. Check file httpd.conf : nano /etc/httpd/httpd.conf Find this : LoadModule deflate_module modules/mod_deflate.so Create /etc/httpd/conf.d/deflate.conf with the following contents  # Insert filter SetOutputFilter DEFLATE # Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine BrowserMatch bMSIE !no-gzip !gzip-only-text/html # Don't compress images SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary # Don't compress already compressed stuff ! SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary # Log Stuff ! #DeflateFilterNote Input input_info #DeflateFilterNote Output output_info #DeflateFil...

Mysql Adding data to row without replacing existing data

Adding data to row without replacing existing data I  have a column  in a row with value 'White' and want to update it to 'Not White'. The following query will change the value from 'White' to 'Not White' i.e. UPDATE table SET color = CONCAT( 'Not ', color) WHERE id=1 Now the column will have the value 'Not White'. And if I want to append the new value at the end, change the parameters order in the  CONCAT()  function. UPDATE table SET color = CONCAT( color, ' Not') WHERE id=1 Now the column will have the value 'White  Not '.

Installation Of SMS Server Tools 3 And PlaySMS On Debian Server

This tutorial will show you how you can set up an SMS server on Debian with playsms and smstools. In my example I have used an old Nokia 5140i with a USB datacable. What we need before we start is apache2, mysql server, php5, lynx, wget, curl. Now we install updates, and install dependencies: apt-get update apt-get upgrade apt-get install apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin make gcc sendmail lynx wget curl Now create a password for mysql root user, and remember it. Installing playsms adduser playsms mkdir -p /var/www/playsms mkdir -p /var/spool/playsms mkdir -p /var/log/playsms chown -R www-data /var/www/playsms chown -R www-data /var/spool/playsms chown -R www-data /var/log/playsms And next download latest version of playSMS, find latest here, or grab my url: http://sourceforge.net/projects/playsms/ wget http://downloads.sourceforge.net/project/playsms/playsms/Version%200.9.5.2/playsms-0.9.5.2.tar.gz This will extract playsms to /usr/local/src. tar ...

apt-get behind proxy

We can use apt-get behind proxy. We should place proxy on bashrc. #nano /etc/bash.bashrc Tambahkan export http_proxy http://username:password@proxy.polsri.ac.id:8080/ export ftp_proxy http://username:password@proxy.polsri.ac.id:8080/

Include dbase on PHP 5.3 Centos 5.7

I want to enable dbase on PHP 5.3. And i found website that have information about it. Environment : OS : CentOS 5.7 Final Web Server : httpd-2.2.3-53 PHP : php53-5.3.3-1.el5_6.1 Programming Language : gcc Download package from php.net [root@compare] # wget http://pecl.php.net/get/dbase-5.0.1.tgz Extract package [root@compare] # tar -zxvf dbase-5.0.1.tgz Prepare the build environment for a PHP extension and compile [root@compare] # cd dbase-5.0.1 [root@compare] # phpize [root@compare] #./configure [root@compare] # make [root@compare] # make install copy dbase.so to http modules [root@compare] # cp /root/php/dbase-5.0.1/modules/dbase.so /usr/lib64/httpd/modules/ Message error if dbase.so not compatible or not installed correctly [Wed Oct 26 20:15:28 2011] [error] [client 192.168.1.254] PHP Fatal error: Call to undefined function dbase_open() in /var/www/html/compare/impdbf.php on line 19 That's all Source : http://www.myee.web.id/index.php/howto.html

SCP How To

There are many software that can be use to transfer file. Many people use File Transfer Protocol to transfer file between computers. If you use Operating System Linux, you can use scp. scp is used for copying file from local to remote host securely. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. If you want to copy a file from a remote host to the local host: scp user@remotehost.com:filename /path/local/directory If you want to copy a file from the local host to a remote host: scp /path/local/directory user@remotehost.com:filename If you want to copy a directory from local host to a remote host scp -r /path/local/directory user@remotehost.com:/path/remote/directory If you want to copy a directory from remote host to a local host scp -r user@remotehost.com:/path/remote/directory /path/local/directory If you want to copy a file from remote host 1 to remote host 2 (copy file between remote host) scp user@remotehost1.com:/path/remote/...