Sử dụng nginx làm proxy vượt tường lửa

Sử dụng nginx làm proxy vượt tường lửa

Lướt Facebook chập chờn, sử dụng public proxy lại chậm chạp. Nếu bạn có một dedicated server hay một vps, chúng ta có thể cài nginx để làm một http proxy hỗ trợ việc truy cập Facebook.

Sử dụng nginx làm proxy vượt tường lửa

Mở file cấu hình nginx, thường là /etc/nginx/nginx.conf, hoặc /opt/nginx/conf/nginx.conf, trong khối lệnh http {}, chúng ta chèn thêm đoạn sau:

server {
  server_name proxy.local;
  listen 82;
  location / {
       resolver 8.8.8.8; 
       proxy_pass http://$http_host$request_uri; } 
}

Xong xuôi rồi thì lưu file và restart lại nginx. Chỉ vài bước đơn giản là chúng ta đã có được một HTTP proxy.

Bước tiếp theo là cấu hình Firefox để sử dụng HTTP proxy này:

Vào phần cấu hình của Firefox, chọn phần Advanced, chọn tab Network, ở field connection, bạn click nút "Setting...". Ở mục chọn proxy, bạn cần chọn "Manual proxy configuration", ở HTTP Proxy, nhập vào IP của server, port là 82 như phần cấu hình ở trên.

image jn3U3BfGblrBB.png

Cấu hình proxy cho Firefox

[via Xeko Magazine]

 

Tags: 
Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Internet Việt Nam bị ảnh hưởng bởi sự cố đứt cáp AAG

Internet Việt Nam bị ảnh hưởng bởi sự cố đứt cáp AAG

Vào lúc 1 giờ 21 sáng ngày 13/8, tuyến cáp biển AAG đã xảy ra sự cố đứt tuyến cáp tại phân đoạn Vũng Tàu - Hồng Kông làm ảnh hưởng đến các nhà cung cấp dịch vụ Internet đang sử dụng AAG như VNPT, Viettel hay FPT Telecom.

LibreSource

Giới thiệu 7 Control Systems

If you’ve ever collaborated with other people on a project, you know the frustration of constantly swapping files. Some do it by email, some through file upload services and some by other methods. It’s a pain in the neck, and every designer and developer knows it. Revision control is an excellent way to combat the problem of sharing files between workers.

Xem qua Commerce Kickstart 2 cho Drupal E-commerce

Xem qua Commerce Kickstart 2 cho Drupal E-commerce

We first blogged about Drupal Commerce in late 2011.

Công ty diệt chuột T&C

 

Diet con trung