<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                配置基于名稱的虛擬主機,我們需要提前做好DNS記錄,并且要求每個虛擬主機獨立放一個文件,然后在nginx.conf中include包含進來 案例: 域名: bbs.51pet.com www.51pet.com 服務器IP: 10.2.11.245 網站目錄: /application/bbs /application/www 日志文件: /applicaiton/bbs/logs /application/www/logs 配置文件: /etc/nginx/conf.d/bbs.conf /etc/nginx/conf.d/www.conf [root@static ~]# mkdir -p /application/{bbs,www}/logs [root@static nginx]# mkdir conf.d [root@static nginx]# cd conf.d/ 配置虛擬主機一:bbs.51pet.com [root@static conf.d]# vim bbs.conf server { listen 80; server_name bbs.51pet.com; #charset koi8-r; access_log /application/bbs/logs/bbs.access.log main; location / { root /application/bbs/; index index.php index.html index.htm; #if (!-e $request_filename) { # rewrite ^/(.*)$ /index.php/$1 last; #} } #error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php/?.*$ { root /application/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; set $fastcgi_script_name2 $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $fastcgi_script_name2 $1; set $path_info $2; } fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2; fastcgi_param SCRIPT_NAME $fastcgi_script_name2; } } 配置虛擬主機二: server { listen 80; server_name www.51pet.com; #charset koi8-r; access_log /application/www/logs/www.access.log main; location / { root /application/bbs/; index index.php index.html index.htm; #if (!-e $request_filename) { # rewrite ^/(.*)$ /index.php/$1 last; #} } #error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php/?.*$ { root /application/bbs; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi.conf; set $fastcgi_script_name2 $fastcgi_script_name; if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") { set $fastcgi_script_name2 $1; set $path_info $2; } fastcgi_param PATH_INFO $path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name2; fastcgi_param SCRIPT_NAME $fastcgi_script_name2; } } 然后在nginx.conf包含進這兩個虛擬主機文件 include conf.d/*.conf; (配置在http段) [root@static conf.d]# /usr/local/nginx/sbin/nginx -s reload 最后測試: [root@static conf.d]# echo bbs.51pet.com > /application/bbs/index.html [root@static conf.d]# echo www.51pet.com > /application/www/index.html
                  <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>

                              哎呀哎呀视频在线观看