Portfolio
host

Sử dụng HTTPS với Varnish

March 20, 2018Category : IT & Network

Như các bạn đã biết, Varnish không trực tiếp hỗ trợ SSL/TLS. Tuy nhiên, khi tiến hành nâng cấp lên HTTPS, mình đã tìm được cách để sử dụng được HTTPS với Varnish, đó là dùng mô hình SSL Termination Proxy. Cách thức hoạt động của mô hình SSL Termination Proxy sử dụng Nginx kết hợp với Varnish: Một..

Read more
01.

Cấu hình Varnish hoạt động trên 2 port khác nhau

March 20, 2018Category : IT & Network

Nếu bạn sử dụng HocVPS Script, bên cạnh port 80, mình còn để Nginx listen thêm một port admin nữa, mặc định là 2313. Listen port 80 thì đơn giản rồi, tuy nhiên, làm thế nào để Varnish listen thêm một port khác nữa và connect với backend thì là vấn đề khác. Nhân dịp..

Read more
02.

WinNMP – Config

February 27, 2018Category : Code/Web IT & Network

How to send emails using PHP WinNMP has 2 options for processing emails sent by PHP’s mail() function: mSmtp and mailToDisk (default). To change the option, edit confphp.ini and modify sendmail_path: For Development use mailToDisk (the default): sendmail_path = ‘”C:/WinNMP/bin/php” -n -f “C:/WinNMP/include/tools/mailtodisk.php”‘ Emails will be saved to logmail-XX.txt For Production use mSmtp: sendmail_path = ‘”C:/WinNMP/bin/msmtp/msmtp.exe” -C “C:/WinNMP/conf/msmtp.ini” -t’ You also need to edit confmsmtp.ini in order to configure SMTP server options   How..

Read more
05.

Cấu hình proxy nodejs trên nginx

December 18, 2017Category : Code/Web

Add nginx conf location /cors4all/ { client_max_body_size 10m; client_body_buffer_size 128k; proxy_send_timeout 90; proxy_read_timeout 90; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; proxy_temp_file_write_size 256k; proxy_connect_timeout 30s; proxy_pass http://127.0.0.1:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; proxy_http_version 1.1; proxy_cache_bypass $http_upgrade; }

Read more
06.

Cài đặt và cấu hình Let’s Encrypt trong OpenLiteSpeed

October 9, 2017Category : Code/Web IT & Network

Cài đặt Certbot Cách dễ dàng để cài đặt chứng chỉ Let’s Encrypt trên VPS là sử dụng Certbot Client. Trên CentOS 7, Certbot có sẵn ở EPEL Repository. Bạn chỉ cần enable lên với câu lệnh sau: 1 rpm –ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm Ubuntu bạn cần cấu hình Certbot PPA với câu lệnh sau: 1 2 3..

Read more
07.

Cài đặt WordPress trong web server OpenLiteSpeed

October 9, 2017Category : Code/Web IT & Network

Bước 1: Tạo cơ sở dữ liệu Đăng nhập Maria DB với user root: 1 mysql –u root –p Tạo một cơ sở dữ liệu wordpress: 1 CREATE DATABASE wordpress; Tạo user: 1 CREATE USER ‘wpuser’@‘localhost’ IDENTIFIED BY ‘wppassword’; Cấp quyền cho user: 1 2 3 GRANT ALL PRIVILEGES ON wordpress.* TO ‘wpuser’@‘localhost’ IDENTIFIED BY..

Read more
08.

Cách thêm website trong web server OpenLiteSpeed

October 9, 2017Category : Code/Web IT & Network

Cách thêm Virtual Host trong OpenLiteSpeed ​Truy cập WebAdmin: http://your_ip_adress:7080 ​Đi tới Virtual Hosts -> Add.  Nhập vào thông tin chi tiết như bên dưới: Variables Value Virtual Host Name ($VH_NAME) elegantjava.info Virtual Host Root ($VH_ROOT) $SERVER_ROOT/elegantjava.info/ Config File $SERVER_ROOT/conf/vhosts/$VH_NAME/elegantjava.info.conf Follow Symbolic Link Yes Enable Scripts/ExtApps Yes Restrained Yes ExtApp Set UID Mode Server UID Trong phần..

Read more
09.

Cách tìm IP thật của server đằng sau CloudFlare hay các dịch vụ CDN

October 9, 2017Category : Bug & Security Code/Web

Guide này nhằm giúp các System Admin nhận ra được rằng mình “misconfiguration” ở đâu khiến hệ thống bị lộ real IP khiến các kẻ tấn công DDoS dễ dàng tấn công hệ thống mà bỏ qua các lớp CDN bảo vệ. Đầu tiên ta cần phải biết danh sách IP của cloudflare (CloudFlare IP)..

Read more
010.

[wordpress] Hướng dẫn cài đặt wp MULTISITE

September 18, 2017Category : Code/Web

ỨNG DỤNG CỦA WORDPRESS MULTISITE Hầu hết nếu chúng ta có nhu cầu tạo ra một mạng lưới nhiều website liên kết với nhau trên cùng một máy chủ thì có thể sử dụng WordPress Multisite. Chúng ta có thể sử dụng WordPress Multisite để tạo nhiều trang con trong một mạng lưới như vậy,..

Read more
011.

Add videojs player html5 with javascript

November 18, 2015Category : Code/Web

index.php <div id=”video”><p> Restart or F5 browser to view this content.</p></div> <link href=”<?php echo get_template_directory_uri(); ?>/css/video-js.min.css” rel=”stylesheet”> <script src=”<?php echo get_template_directory_uri(); ?>/js/videojs.min.js”></script> <script src=”<?php echo get_template_directory_uri(); ?>/js/jquery.min.videojs.js”></script> <script type=’text/javascript’> var obj, source; obj = document.createElement(‘video’); $(obj).attr(‘id’, ‘example_video_test’); $(obj).attr(‘class’, ‘video-js vjs-default-skin’); $(obj).attr(‘controls’, ‘ ‘); $(obj).attr(‘poster’, ‘http://todaytv.club/movie_night_image.jpg’); $(obj).attr(‘preload’, ‘auto’); $(obj).attr(‘data-setup’, ‘{“inactivityTimeout”: 0}’); $(obj).attr(‘autoplay’, ‘true’); source = document.createElement(‘source’);..

Read more
012.

[WP] W3 Total Cache settings with Cloudflare GUIDE

October 12, 2015Category : Code/Web

W3 Total cache is a WordPress Performance Optimization framework that is designed to improve user experience and page speed.  It is recommended by many web hosting providers, and used by countless major websites such as mashable.com as well as many others. W3TC  improves the user experience of your site by increasing web server performance by reducing..

Read more
013.

Hiểu về hệ thống ngăn ngừa xâm nhập – IPS

September 5, 2015Category : IT & Network

IPS (Intrusion Prevention Systems – Hệ thống ngăn ngừa xâm nhập) là hệ thống theo dõi, ngăn ngừa kịp thời các hoạt động xâm nhập không mong muốn. Chức năng chính của IPS là xác định các hoạt động nguy hại, lưu giữ các thông tin này. Sau đó kết hợp với firewall để dừng ngay các hoạt..

Read more
014.

Điều cần phải làm trước khi ra mắt trang web Magento

August 20, 2015Category : Code/Web

1. Thay đổi Base URLs Những URL này được lưu trữ trong cơ sở dữ liệu của Magento, khoá core_config_data. Bạn cũng có thể thay đổi nó trong Admin của Magento bằng cách vào System > Configuration > Web. Bạn chỉ thay đổi cái này khi bạn chuyển domain hoặc đổi kiểu domain, ví dụ khi bạn cài SSL cho trang web..

Read more
016.
© Oliver / All rights reserved.
To top