掃二維碼與項(xiàng)目經(jīng)理溝通
我們在微信上24小時(shí)期待你的聲音
解答本文疑問/技術(shù)咨詢/運(yùn)營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流
Nginx http服務(wù)配置文件有很多需要我們掌握的命令,下面我們就來詳細(xì)的看看有關(guān)的問題如何才能解決。只有不斷的學(xué)習(xí)才能更好的掌握有關(guān)的Nginx http服務(wù)配置的技巧。

創(chuàng)新互聯(lián)是一家專業(yè)提供沁源企業(yè)網(wǎng)站建設(shè),專注與網(wǎng)站制作、做網(wǎng)站、H5開發(fā)、小程序制作等業(yè)務(wù)。10年已為沁源眾多企業(yè)、政府機(jī)構(gòu)等服務(wù)。創(chuàng)新互聯(lián)專業(yè)網(wǎng)站設(shè)計(jì)公司優(yōu)惠進(jìn)行中。
- user www www;
- worker_processes 5;
- error_log /var/nginx/logs/error.log;
- #error_log logs/error.log notice;
- #error_log logs/error.log info;
- pid /var/nginx/nginx.pid;
- events {
- use epoll;
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- root /var/www/htdocs/;
- log_format main '$remote_addr - $remote_user [$time_local] $request '
- '"$status" $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/nginx/logs/access.log main;
- sendfile on;
- tcp_nopush on;
- #keepalive_timeout 0;
- keepalive_timeout 65;
- gzip on;
- server {
- listen 80;
- server_name localhost;
- #charset koi8-r;
- access_log /var/nginx/logs/host.access.log main;
- location / {
- root /var/www/htdocs/;
- index index.html index.htm index.php;
- }
- error_page 404 /404.html;
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /var/www/htdocs;
- }
- location ~ \.php$ {
- root html;
- fastcgi_pass 127.0.0.1:10005;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /var/www/htdocs/$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~ /\.ht {
- deny all;
- }
- }
- }
以上就是對Nginx http服務(wù)的詳細(xì)介紹,希望大家有所收獲。

我們在微信上24小時(shí)期待你的聲音
解答本文疑問/技術(shù)咨詢/運(yùn)營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流