<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                >[danger]mac上安裝Ngnix 1. 查看ngnix的一些默認配置 `$ brew info nginx` ![](https://box.kancloud.cn/4884490cc3423c01cefaab1bed42c3aa_684x339.png) 2. 正式安裝 `$ brew install nginx ` 3. nginx 真正安裝到的位置 `$ /usr/local/Cellar/nginx` 4. 資源文件路徑 `$ /usr/local/var/www` 5. 啟動nginx服務 `$ nginx` 沒有任何反應是正常的 6. 訪問localhost:8080, 成功了 ![](https://box.kancloud.cn/ac68795e5f5ef91669af587246d7f137_1130x366.png) >[danger]Nginx配置 ---- 查看文件 `$ /usr/local/etc/nginx/nginx.conf` ``` # 運行用戶, 默認即是nginx, 可不設置 #user nobody; # 一般設置和CPU內核數一樣 worker_processes 1; # 錯誤日志存放目錄 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; # 進程pid存放的位置 #pid logs/nginx.pid; # 工作模式以及連接上限 events { # 單個后臺worker process進程最大并發連接數 worker_connections 1024; } http { # 文件擴展名與類型映射表 include mime.types; # 默認文件類型 default_type application/octet-stream; # 設置日志模式 (日志格式) # $remote_addr 與 $http_x_forwarded_for 用以記錄客戶端的ip地址; # $remote_user :用來記錄客戶端用戶名稱 # $time_local : 用來記錄訪問時間與時區; # $request : 用來記錄請求的url與http協議; # $status : 用來記錄請求狀態;成功是200; # $body_bytes_s ent :記錄發送給客戶端文件主體內容大小; # $http_referer :用來記錄從那個頁面鏈接訪問過來的; # $http_user_agent :記錄客戶端瀏覽器的相關信息; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; # nginx訪問日志(并使用main 日志格式) #access_log logs/access.log main; # 開啟高效傳輸模式 sendfile on; # 激活tcp_nopush參數可以允許把httpresponse header和文件的開始放在一個文件里發布, # 積極的作用是減少網絡報文段的數量 #tcp_nopush on; # 連接超時時間,單位是秒 #keepalive_timeout 0; keepalive_timeout 65; # 開啟gzip壓縮功能 #gzip on; # 基于域名的虛擬主機 server { # 監聽端口 8080 listen 8080; # 服務器名字 (客戶端訪問localhost:8080即可) server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; # 請求的url過濾, /代表請求根路徑. ~區分大小寫, ~*不區分大小寫 location / { # 設置根目錄 root html; # 設置默認頁 index index.html index.htm; # proxy_pass http://mysvr; # 請求轉向mysvr 定義的服務器列表 # deny xx.xx.xx.xx; # 拒絕的ip # allow xx.xx.xx.xx; # 允許的ip } # 錯誤頁面 404 #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # # 50開頭狀態 對應頁面 error_page 500 502 503 504 /50x.html; # 訪問50.html頁面 location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # # 匹配符合php擴展名的請求 #location ~ \.php$ { # root html; # #拋給本機的9000端口 # fastcgi_pass 127.0.0.1:9000; # 設定動態頁 # fastcgi_index index.php; # 腳本文件請求的路徑 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # 文件擴展名與類型映射表 # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } # 另外一個服務器配置表 # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # 服務端證書和服務端key所在路徑 # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} include servers/*; } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看