Showing posts with label Lighttpd. Show all posts
Showing posts with label Lighttpd. Show all posts

2014-09-04

How should I call this?

 LAMP = Linux + Apache HTTP Server + MySQL relational database management system + PHP

???? = Linux + Lighttpd + Sqlite + PHP-cgi;
     

2014-08-20

Private MailBox on Raspberry Pi


Buy a domain "something.com" or "somethingelse.eu" or what ever.
For my domain name, I paid ~10 euro for a year.
I bought from http://www.serveriai.lt/
I assume that Raspberry Pi you already have. And You also have stable internet at home and you can access your network from outside it means external static IP or IP that changes very rarely.
 
If you thinking , why do I need this, there is a lot free mail accounts on google yahoo etc...
Don't ask me! I am gonna ignore you!

Installation:

# aptitude install lighttpd

# aptitude install postfix  

# aptitude install dovecot-core dovecot-imapd

download roundcube and extract to /var/www/

install by following instructions in
http://<yourDomainName>/roundcubemail/installer/

Configuration:

lighttpd have to be configured for php support, more info about it is in here

Add your domain name to:
$ sudo nano /etc/hosts
127.0.0.1    localhost <domanName>

Testing:

Make sure tcp ports are open:

# netstat -nat
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      lighttpd
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN    dovecot
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      postfix
 

For you to get mail's outside your local network, You have to open tcp port 25 for public in your router, but right after you open to public, definitely test you postfix configuration otherwise you can be banned for spam. 
Test is very easy:


http://www.mailradar.com/openrelay/


Adding user for mail:


# adduser <userName>
# usermod -a -G mail <userName>


If you want to add <firstName.lastName> do it like this:
 
# adduser --force-badname <firstName.lastName>


 




 

It's not super fast, but it fast enough for me to use it. I am still testing...  but I like it so far!




** Update **


You will be spammer by default unless your internet provider can help you and set "reversDNS" for you.

So now I have to decide, ether I change my internet provider and pay more money and than continue with mail box or spare some money and forget this idea. 


2013-04-16

Favorite Linux applications


Video Player: mplayer
               without skin 

Media Center: xbmc  (PC video on TV)
            This is the reason for baying HTPC not a player with embedded software inside...

Music Player: deadbeef
         Preferred  lossless audio (flac)

Mail Client: gnome evolution mail
          on Debian works better then on Mint or Ubuntu

Internet Browser: Firefox

Text Editor: Medit
          For those how like notepad++ on Windows, I think, Medit is the best choice on Linux

Torrent Client: Deluge

Calculator: Galculator
         for hex to bin & dec to hex ...


Disk & Partition Tools: Gnome disk utility
        Debian squeeze version only (bad update for Ubuntu or Mint)


Home server: lighttpd,proftpd


Communication: skype 2.2.0.35 beta
        I gonna use skype until this version works (updates not welcome!)
        Now tying to find free & so-so working voip client, no success jet.

USB Boot disk creator: unetboot

Development: Qt-SDK, Codelite-IDE





2012-11-03

lighttpd instalation & configuration on Debian Squeeze

Install package's: 
lighttpd
php5-cgi
libsqlite3-dev
sqlite3
php5-sqlite
php5

All dependencies:
libonig2 (version 5.9.1-1) will be installed
libqdbm14 (version 1.8.77-4) will be installed
libsqlite0 (version 2.8.17-6) will be installed
libsqlite3-dev (version 3.7.3-1) will be installed
libterm-readkey-perl (version 2.30-4) will be installed
libterm-readline-perl-perl (version 1.0303-1) will be installed
lighttpd (version 1.4.28-2+squeeze1) will be installed
php5-cgi (version 5.3.3-7+squeeze14) will be installed
php5-common (version 5.3.3-7+squeeze14) will be installed
php5-sqlite (version 5.3.3-7+squeeze14) will be installed
php5-suhosin (version 0.9.32.1-1) will be installed       
sqlite3 (version 3.7.3-1) will be installed
php5 (version 5.3.3-7+squeeze14) will be installed


Enable fastcgi, by creating symbolic link:



# ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf

 10-fastcgi.conf need's to be updated:

$php-cgi -v



 PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cgi-fcgi) (built: Aug  6 2012 20:09:06)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH



$which php-cgi
$/usr/bin/php-cgi

#nano /etc/lighttpd/conf-enabled/10-fastcgi.conf


Content of file:
--------------------------------------------------------------------------------------------
# /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi

server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" => ((
                     "bin-path" => "/usr/bin/php-cgi",
                     "socket" => "/tmp/php.socket"
                 )))
--------------------------------------------------------------------------------------------
or 
--------------------------------------------------------------------------------------------
# /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
# http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions#mod_fastcgi-fastcgi

server.modules += ( "mod_fastcgi" )

fastcgi.server = ( ".php" => ((
            "bin-path" => "/usr/bin/php-cgi",
            "socket" => "/tmp/php.socket",
            "max-procs" => 2,
            "idle-timeout" => 20,
            "bin-environment" => (
                "PHP_FCGI_CHILDREN" => "4",
                "PHP_FCGI_MAX_REQUESTS" => "10000"),
            "bin-copy-environment" => (
                "PATH", "SHELL", "USER"),
            "broken-scriptfilename" => "enable"
                 )))
 --------------------------------------------------------------------------------------------
The module  fastcgi is added, and path to php-cgi is set! Good!

Restart server
# /etc/init.d/lighttpd restart

Create the file "index.php" to /var/www/
With Content:
--------------------------------------------------------------------------------------------
<?php phpinfo(); ?>
--------------------------------------------------------------------------------------------




This, helped me:

http://www.cyberciti.biz/tips/lighttpd-php-fastcgi-configuration.html