»

Install Mod-FastCGI and PHP5-FPM on Ubuntu

Log — Tags: , , , , — Posted by Starck on August 22, 2013

Installation

Configuration

edit /etc/apache2/mods-enabled/fastcgi.conf:

Restart Apache2 and PHP5-FPM

— Updated 2014-01-09 (Ubuntu 13.10)–

mkdir /var/www/cgi-bin

touch /var/www/cgi-bin/php5.fcgi

chown -R www-data:www-data /var/www/cgi-bin

edit /etc/apache2/mods-enabled/fastcgi.conf:

Virtual host setting example :

References

Continue Reading

Nginx with Apache + FastCGI + PHP-FPM

Apigen – PHP API Document generator

Log — Tags: , — Posted by Starck on August 20, 2013


APIGEN LOGO

Usage:

If u got a problem about memory limit, just give it memory_limit parameter:

php -d memory_limit=800M apigen.php

Craft Example:

CSS Preloading

Log — Posted by Starck on August 1, 2013

CSS preloading example:

css preloading

Uninstall Open Directory Service on MacOS

Log — Posted by Starck on July 15, 2013


In terminal:

sudo slapconfig -destroyldapserver

Building Your Own Mail Server

Log — Tags: , — Posted by Starck on July 5, 2013


Requirments:


Installation

主要參考 Linode Library 的這篇教學

Postfix Settings

/etc/postfix/main.cf

/etc/postfix/mysql-virtual-mailbox-domains.cf:

/etc/postfix/mysql-virtual-mailbox-maps.cf:

/etc/postfix/mysql-virtual-alias-maps.cf:

測試:


Dovecot Settings

In this section, you’ll configure Dovecot to:

  • Set the IMAP, POP3, and LMTP protocols
  • Define the mail location
  • Use MySQL for username/password lookups for authentication
  • Configure needed sockets for authentication and LMTP
  • Require SSL encryption

You’ll modify a total of 7 Dovecot configuration files. Here’s the list:

  • /etc/dovecot/dovecot.conf: Dovecot’s main configuration file
  • /etc/dovecot/conf.d/10-mail.conf: Deals with the server’s file system
  • /etc/dovecot/conf.d/10-auth.conf: Defines how user authentication is handled
  • /etc/dovecot/conf.d/auth-sql.conf.ext: New authentication file for SQL-type authentication
  • /etc/dovecot/dovecot-sql.conf.ext: An included authentication file with the MySQL connection parameters
  • /etc/dovecot/conf.d/10-master.conf: Where sockets are configured
  • /etc/dovecot/conf.d/10-ssl.conf: Where SSL-related parameters are specified


/etc/dovecot/dovecot-sql.conf.ext:

如果要開啟 pop3 110 port, /etc/dovecot/conf.d/10-master.conf:


PostfixAdmin permission issue (myself)

/etc/dovecot/conf.d/10-master.conf:


Reference

Correct the Issue of Category Display

Log — Posted by Starck on June 25, 2013


修正 index.php:

Vim Page Scroll in Terminal.app

Log — Posted by Starck on June 24, 2013


修改 Terminal 的鍵盤設定:

  • Home : \033[1~
  • End : \033[4~
  • PageUp : \033[5~
  • PageDown : \033[6~

轉移 beyond.com.tw

Log — Posted by Starck on June 24, 2013


決定將 beyond.com.tw 轉到跟 starcklin.com 同一台主機上, 方便以後的管理。

預計的工作內容為:

  • DNS 設定 (已完成)
  • Server 的 Apache 設定 (已完成)
  • 檔案上傳到 Server (已完成)
  • 用 WordPress 的 import / export 轉移資料) (已完成)
  • 更新 WordPress (已完成)
  • 調整 Plugins 與 starcklin.com 一致

Redirect in BASH

Log — Tags: — Posted by Starck on June 23, 2013


# 執行 command, 標準輸出結果轉到 correct.txt, 錯誤輸出結果轉到到 error.txt
$ [command] 1> correct.txt 2> error.txt

要讓錯誤輸出結果不顯示, 可以利用/dev/null:

$ [command] 1> result.txt 2> /dev/null



example:

# 顯示 gem 的規格, 如果沒有這個 gem 則不顯示任何訊息
$ gem spec [gem name] 2>/dev/null
# gem spec zurb-foundation 2>/dev/null

beyond inc. ASCII Art

Log — Posted by Starck on June 20, 2013


« Previous PageNext Page »
(c) 2022 Starck Lin | powered by WordPress