秀米云香港服务器

首先找到nginx的设置文件nginx.conf

[[email protected]nginx]#vinginx.conf打开设置文件后找到雷同下面一段:include/etc/nginx/conf.d/*.conf;

序列号 CPU RAM HDD 带宽 售价(美元) 免费试用
香港服务器1 E5-2620 32G 1T HDD 50M/无限流量 $196.00 立即申请
香港服务器2 E5-2650 32G 1T HDD 50M/无限流量 $256.00 立即申请
香港服务器3 E5-2680 32G 1T HDD 50M/无限流量 $316.00 立即申请
香港服务器4 E5-2690 32G 1T HDD 50M/无限流量 $336.00 立即申请
香港服务器5 E5-2697 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器6 E5-2620*2 32G 1T HDD 50M/无限流量 $376.00 立即申请
香港服务器7 E5-2650*2 32G 1T HDD 50M/无限流量 $436.00 立即申请
香港服务器8 E5-2680*2 32G 1T HDD 50M/无限流量 $476.00 立即申请
香港服务器9 E5-2690*2 32G 1T HDD 50M/无限流量 $556.00 立即申请
香港服务器10 E5-2697*2 32G 1T HDD 50M/无限流量 $596.00 立即申请
香港服务器11 E5-2680v4*2 32G 1T HDD 50M/无限流量 $696.00 立即申请
香港服务器12 E5-2698v4*2 32G 1T HDD 50M/无限流量 $796.00 立即申请

没有的就加上,这是我的路径,你们的看实际环境改改,,确保路径存在

插手这段的意思实际是把conf.d目次的以.conf末了的设置文件都加载进来,修改后生存nginx.conf文件

然后进入conf.d目次

[[email protected]nginx]#cd/etc/nginx/conf.d/然后把目次下面的文件都列出来:[[email protected]conf.d]#ll默认的话,目次下面有个default.conf文件

打开default.conf文件后如下:

server{listen80;server_namelocalhost;#charsetkoi8-r;access_log/var/log/nginx/access.logmain;root/var/www/baidu;indexindex.phpindex.htmlindex.htm;location/{try_files$uri$uri/=404;}error_page404/404.html;#redirectservererrorpagestothestaticpage/50x.html#error_page500502503504/50x.html;location=/50x.html{root/var/www;}#proxythePHPscriptstoApachelisteningon127.0.0.1:80##location~.php${#proxy_passhttp://127.0.0.1;#}#passthePHPscriptstoFastCGIserverlisteningon127.0.0.1:9000#location~.php($|/){try_files$uri=404;#rewrite^/index.php/(.*)$/$1last;fastcgi_passunix:/var/www/php-fpm.sock;fastcgi_indexindex.php;fastcgi_paramPATH_INFO$fastcgi_path_info;fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;includefastcgi_params;fastcgi_intercept_errorson;fastcgi_ignore_client_abortoff;fastcgi_connect_timeout60;fastcgi_send_timeout180;fastcgi_read_timeout180;fastcgi_buffer_size128k;fastcgi_buffers4256k;fastcgi_busy_buffers_size256k;fastcgi_temp_file_write_size256k;}#location~.php${#roothtml;#fastcgi_pass127.0.0.1:9000;#fastcgi_indexindex.php;#fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name;#includefastcgi_params;#}#denyaccessto.htaccessfiles,ifApache'sdocumentroot#concurswithnginx'sone##location~/.ht{#denyall;#}}假如把上面的设置作为当地设置一个百度网站的配置,那么其会见的端口为默认80端口,会见解点就是:http://localhost/

假如我们想用81端口设置为当地的别的一个网站的会见进口,应该怎么设置呢?

首先你需要在conf.d目次下建设一个以.conf末了的文件,好比:google.com.conf文件,可能直接copy一个default.conf文件也可以,详细设置如下:

标题:nginx处事器利用差异端口设置多个网站站点

地址: https://www.yunhk.xyz/26074.html