Professional Documents
Culture Documents
Blackstreetnight Wordpress Com
Blackstreetnight Wordpress Com
Blackstreetnight Wordpress Com
Search Subscribe
LINUX
// you're reading...
DEBIAN, LINUX, UBUNTU CATEGORIES
Suatu waktu berkesempatan mencoba Nginx (engine-X), yang konon katanya high-performance web server, ringan, dan cepat dibaca di http://wiki.nginx.org
Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Igor Sysoev started development of Nginx in 2002, with the first public release in 2004. Nginx now hosts nearly 11.28% (43M) of all domains worldwide. Netcraft predicts that current trends will soon have Nginx surpassing Microsoft IIS as the second most popular web server. Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption. Nginx is one of a handful of servers written to address the C10K problem. Unlike traditional servers, Nginx doesnt rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly, predictable amounts of memory under load. Even if you dont expect to handle thousands of simultaneous requests, you can still benefit from Nginxs high-performance and small memory footprint. Nginx scales in all directions: from the smallest VPS all the way up to clusters of servers. Nginx powers several high-visibility sites, such as WordPress, Hulu, Github, Ohloh, SourceForge, WhitePages and TorrentReactor.
Karena memang dipakai buat php programming, dan mysql server buat databasenya, alangkah baiknya jika dicatat agar penulis sendiri tidak lupa dan mudah-mudahan bermanfaat bagi yang lain Saya menggunakan debian linux 64 bit, untuk sistem sejenis (ubuntu, mint dll) saya rasa tinggal disesuaikan sendiri Installasi nginx, php5-fpm Sayang sekali, repository default debian belum menyertakan php5-fpm, jadi penulis menambahkan repository non formal http://packages.dotdeb.org/ ke sources.list, lalu jalankan update dan install
$echo deb http://packages.dotdeb.org/ stable all | sudo tee -a /etc/apt/sources.list
February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 June 2011 February 2011 January 2011 October 2010
BLOGROLL
Deny26 aka archit3x Hellnest Me Integer Manual blog Lisnux Ninja Tuxer Saa7_go
MET A
Kemudian install nginx web server dan php5-fpm, beserta paket lain yang diperlukan
$sudo apt-get install php5-cli php5-suhosin php5-fpm php5-cgi php5-mysql nginx mysql-server phpmyadmin
Default instalasi nginx di debian tidak membuat dan menggunakan /var/www sebagai root dokumen-nya untuk web, tetapi default bawaannya menggunakan direktori /usr/share/nginx/www. Konfigurasi Nginx Agar bisa diakses localhost, buka dan edit file /etc/nginx/sites-available/default
1 $gksudo gedit /etc/nginx/sites-available/default
converted by Web2PDFConvert.com
Kemudian agar nginx bisa memproses php script menggunakan php-fpm tadi, tambahkan di /etc/nginx/sites-available/default, sehingga menjadi
............ location ~ .php$ { fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_pass backend; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; include fastcgi_params; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffer_size 128k; fastcgi_buffers 4 256k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } ## Disable viewing .htaccess & .htpassword location ~ /\.ht { deny all; } } upstream backend { server 127.0.0.1:9000; } ......
Kemudian kita test, dengan membuat file index.php di bawah direktori /var/www, dengan isi : dan coba cek apakah nginx bisa memproses php script tersebut. Kalau sukses, dan tidak ada masalah.. seperti scrinsut di bawah
Kemudian untuk menambahkan phpmyadmin agar bisa diakses, tambahkan baris berikut di /etc/nginx/sites-available/default,
location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $request_filename; include /etc/nginx/fastcgi_params;
converted by Web2PDFConvert.com
} location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpMyAdmin { rewrite ^/* /phpmyadmin last; }
yang nantinya agar bisa diakses dengan alamat http://localhost/phpmyadmin.. ini scrinsut punya penulis
FreeBSD sehari-hari :)
D I S C U S S I O N
NO COMMENTS YET .
LEAVE A REPLY
E n t e r y o u r h e r e . . .
c o m m e n t
Blackstreetnight's Blog
converted by Web2PDFConvert.com