自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Nginx http服務相關的配置文件

開發(fā) 前端
本文主要講述Nginx http服務,怎樣創(chuàng)建Nginx http服務項目。這些內(nèi)容都是一些門戶網(wǎng)站和技術論壇找到的,中間可能有不少錯誤是我沒有挑出的,歡迎大家指正。

Nginx http服務配置文件有很多需要我們掌握的命令,下面我們就來詳細的看看有關的問題如何才能解決。只有不斷的學習才能更好的掌握有關的Nginx http服務配置的技巧。

  1. user www www;  
  2. worker_processes 5;  
  3. error_log /var/nginx/logs/error.log;  
  4. #error_log logs/error.log notice;  
  5. #error_log logs/error.log info;  
  6. pid /var/nginx/nginx.pid;  
  7. events {  
  8. use epoll;  
  9. worker_connections 1024;  
  10. }  
  11. http {  
  12. include mime.types;  
  13. default_type application/octet-stream;  
  14. root /var/www/htdocs/;  
  15. log_format main '$remote_addr - $remote_user [$time_local] $request '  
  16. '"$status" $body_bytes_sent "$http_referer" '  
  17. '"$http_user_agent" "$http_x_forwarded_for"';  
  18. access_log /var/nginx/logs/access.log main;  
  19. sendfile on;  
  20. tcp_nopush on;  
  21. #keepalive_timeout 0;  
  22. keepalive_timeout 65;  
  23. gzip on;  
  24. server {  
  25. listen 80;  
  26. server_name localhost;  
  27. #charset koi8-r;  
  28. access_log /var/nginx/logs/host.access.log main;  
  29. location / {  
  30. root /var/www/htdocs/;  
  31. index index.html index.htm index.php;  
  32. }  
  33. error_page 404 /404.html;  
  34. error_page 500 502 503 504 /50x.html;  
  35. location = /50x.html {  
  36. root /var/www/htdocs;  
  37. }  
  38. location ~ \.php$ {  
  39. root html;  
  40. fastcgi_pass 127.0.0.1:10005;  
  41. fastcgi_index index.php;  
  42. fastcgi_param SCRIPT_FILENAME /var/www/htdocs/$fastcgi_script_name;  
  43. include fastcgi_params;  
  44. }  
  45. location ~ /\.ht {  
  46. deny all;  
  47. }  
  48. }  

以上就是對Nginx http服務的詳細介紹,希望大家有所收獲。

【編輯推薦】

  1. Linux Nginx相關問題解決方案
  2. Nginx反向代理與服務器的配置緩沖
  3. nginx靜態(tài)文件的配置與安全認定
  4. Nginx狀態(tài)監(jiān)控如何實現(xiàn)自己的作用
  5. 深入學習有關Nginx負載均衡的安裝過程
責任編輯:張浩 來源: 博客園
相關推薦

2010-03-29 09:23:00

2010-08-05 14:36:07

NFS服務

2010-11-12 09:44:59

Cassandra配置

2010-03-25 18:31:03

Nginx配置文件

2014-06-09 10:36:00

2009-12-21 11:19:50

WCF配置文件

2020-04-09 13:23:29

Nginx配置文件模板

2010-03-02 15:28:51

Linux系統(tǒng)用戶

2010-03-01 10:14:01

Linux usera

2010-03-25 17:46:27

nginx配置文件

2010-03-25 18:09:23

Nginx配置文件

2010-03-01 15:26:18

Linux配置文件

2010-01-13 13:50:53

CentOS Vsft

2021-06-29 13:09:07

服務配置文件

2010-02-06 14:00:05

Linux Nginx

2018-02-27 11:08:11

2011-03-25 17:13:37

Nagios配置文件

2011-02-25 16:39:34

proftpd配置文件

2010-02-26 14:46:56

Linux user

2021-12-11 22:21:00

服務配置文件
點贊
收藏

51CTO技術棧公眾號