当前位置:Scooters

侠[繁体:俠]义道服务器架设

2025-03-13 07:11:13Scooters

联众里面的游戏侠义道谁清楚?联众的服务器架设好几年了,人多些,也多是些老号迅雷才开服没有多久的。建议去迅雷玩,新服去玩有意思些不过侠义道真的没有什么好玩的大多玩家都认为侠义道属于骗钱游戏。服务器怎么搭

联众里面的游戏侠义道谁清楚?

联众的服务器架设好几年了,人多些,也多是些老号迅雷才开服没有多久的。

建议去《练:qù》迅雷玩,新服去玩有意思些

不过侠义道(读:dào)真的没有什么好玩的

大多[练:duō]玩家都认为侠义道属于骗钱游戏。

服务器怎么搭建?

你是要搭什么服务器?这里分享个linux的web服务器搭建,大概步骤就是下载服务器软件,安装-----启动服务器,修改配置文件-----修改相关路径-----定义服务器属性---测试,收工,

Nginx web服务(wù)器 

1、下{读:xià}载nginx

  命mìng 令:wget http://nginx.org/download/nginx-0.8.54.tar.gz

  2、解[jiě]压

  命(mìng)令:tar zxvf nginx-0.8.54.tar.gz

  3、进入[读:rù]目录

  命(拼音:mìng)令:cd nginx-0.8.54

  4、安装依赖包(pinyin:bāo)

  命令:yum -y install gcc pcre-devel openssl openssl-devel (没有网络[繁体:絡]可在centos中zhōng 找相关(繁体:關)rpm)

  5、执行【pinyin:xíng】 ./configure

  命令【拼音:lìng】:./configure

  6、继续安装《繁:裝》

  命【pinyin:mìng】令:

  make

  和(读:hé)

  make install

  7、启动《繁体:動》nginx服务

  命{读:mìng}令:/usr/local/nginx/sbin/nginx

  8、重启nginx服务[wù]

  命令{lìng}:/usr/local/nginx/sbin/nginx -s reload

  9、修改站开云体育点的【拼音:de】配置文件

  命{练:mìng}令:vi /usr/local/nginx/conf/nginx.conf

  10、多站点【练:diǎn】设置

  ⑴、在 /usr/local/nginx/conf/ 下创(繁:創)建 vhost 目录

亚博体育  命(拼音:mìng)令:mkdir /usr/local/nginx/conf/vhost

  ⑵、在 /usr/local/nginx/conf/vhost 里创[繁体:創]建一个(繁体:個)名字为 linlik.conf 的文件,把站点配置文件写入(请查看最下面的站点内容)

  命令《读:lìng》:vi /usr/local/nginx/conf/vhost/linlik.conf

  ⑶、打开 /usr/local/nginx/conf/nginx.conf 文件《练:jiàn》,在相应位[pinyin:wèi]置加入 include 把以上2个文件包含进来

  在页尾后括号上面加{pinyin:jiā}入一句:include vhost/*.conf 然后保存退(读:tuì)出并重启nginx服务

  11、多站点的站点(繁体:點)配置文档内容

  如下【练:xià】:

  server

  {

  listen 80

  #listen [::]:80

  server_name jiahaolin.com www.111cn.net

  index index.html index.htm index.php default.html default.htm default.php

  root /www/jiahaolin

  include emlog.conf

  #error_page 404 /404.html

  location ~ [^/].php(/|$)

  {

  # comment try_files $uri =404 to enable pathinfo

开云体育

  fastcgi_pass unix:/tmp/php-cgi.sock

  fastcgi_index index.php

  include fastcgi.conf

  #include pathinfo.conf

幸运飞艇

  }

  location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$

  {

  expires 30d

  }

  location ~ .*.(js|css)?$

  {

  expires 12h

  }

  access_log /home/wwwlogs/jiahaolin.com.log access

  }

  NGINX下如何自定(拼音:dìng)义404页面

  IIS和APACHE下自定义404页面的经验介[jiè]绍文章已经非fēi 常多了,NGINX的目前还比较少,为了解决自家的问题特地【拼音:dì】对此作了深入的研究。研究结果表明,NGINX下配置自定义的404页面是可行的,而且很简单,只需如下几步:

  1.创(繁体:創)建自己的404.html页面

  2.更改nginx.conf在http定【读:dìng】义区域加入: fastcgi_intercept_errors on

  3.更改nginx.conf(或单独网站配置文{pinyin:wén}件,例如在(拼音:zài)nginx -> sites-enabled下的站点配置文【pinyin:wén】件 )

  中{读:zhōng}在server 区[繁体:區]域加入: error_page 404 /404.html 或者 error_page 404 =http://www.xxx.com/404.html

  4.更改后重启nginx,,测试nginx.conf正{练:zhèng}确性: /opt/nginx/sbin/nginx –t

  #502 等错《繁体:錯》误可以用同样的方法来配置。

  error_page 500 502 503 504 /50x.html

  注意(yì)事项:

  1.必须要添加:fastcgi_intercept_errors on 如果这个选项没有设置,即使创建了404.html和配置了error_page也没有效果。fastcgi_intercept_errors 语法: fastcgi_intercept_errors on|off 默认: fastcgi_intercept_errors off 添加位置: http, server, location 默认情况下,nginx不支持自定义(繁体:義)404错误页面,只有这个指令被设置为on,nginx才支持将404错误(wù)重定向。这里需要注意的是,并不是说设置了fastcgi_intercept_errors on,nginx就会将404错误重定向。在nginx中404错误重定向生效的前提是设置了fastcgi_intercept_errors on,并且正确的设置了error_page这个选项(包括语法和对应的404页面)

  2.不要出于省事或者提高首页(繁体:頁)权重[zhòng]的目的将首页指定为404错误页面,也不要用(拼音:yòng)其它方法跳转到首页。

  3.自定义的404页面必须大于512字节,否【练:fǒu】则可能会出现IE默认的【拼音:de】404页面。例如,假设自定义了404.html,大小只有11个(繁体:個)字节(内容为:404错误)。

  Nginx 配置安装以及一些常遇到(pinyin:dào)的错误

  nginx 编译安装 一、安装nginx时必【拼音:bì】须先安装相应的编译工具

  yum -y install gcc gcc-c autoconf automake

  yum -y install zlib zlib-devel openssl openssl-devel pcre-devel

  建(练:jiàn)立nginx 组

  groupadd -r nginx

  useradd -s /sbin/nologin -g nginx -r nginx

  id nginx

  zlib:nginx提【pinyin:tí】供gzip模块,需要zlib库支持

  openssl:nginx提供ssl功{读:gōng}能

  pcre:支持地址重写rewrite功能

  Nginx 官(guān)网下载地【练:dì】址: http://nginx.org/ 最新版 http://nginx.org/download/nginx-1.5.2.tar.gz

  二{读:èr}、tar -zxvf nginx-1.2.8.tar.gz

  三{练:sān}、cd nginx-1.2.8

  配《练:pèi》置

  四sì 、./configure

  --prefix=/usr

  --sbin-path=/usr/sbin/nginx

澳门威尼斯人

  --error-log-path=/var/log/nginx/error.log

  --pid-path=/var/run/nginx/nginx.pid

  --user=nginx

世界杯下注

  --group=nginx

  --with-http_ssl_module

  --with-http_flv_module

  --with-http_gzip_static_module

  --http-log-path=/var/log/nginx/access.log

  --http-client-body-temp-path=/var/tmp/nginx/client

开云体育

  --http-proxy-temp-path=/var/tmp/nginx/proxy

  --http-fastcgi-temp-path=/var/tmp/nginx/fcgi

  --with-http_stub_status_module

  或者使用[pinyin:yòng]默认的 直接 ./configure

  编译[繁体:譯]并且安装

  五《读:wǔ》、make && make install

  编译完成后 make install 进行安装 安转后就大功告《gào》成拉

  小[读:xiǎo]结:centos没有安装make编译器

  解【拼音:jiě】决:yum -y install gcc automake autoconf libtool make

  重启动[繁体:動]命令[lìng] /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 更多参考 nginx --help

  nginx 的配置以及常见小问题 如下《读:xià》:

  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) 错误解决(繁:決)

  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

  nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

  nginx: [emerg] still could not bind()

  问题描述[pinyin:shù]:地址已《读:yǐ》被使用。可能nginx服务卡死了,导致端口占用,出现(繁:現)此错误。

  解(练:jiě)决方法:首先用【拼音:yòng】lsof:80看下80端口被[pinyin:bèi]什么程序占用。lsof返回结果如下:

  COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

  nginx 3274 root 6u IPv4 10664 0t0 TCP *:http (LISTEN)

  nginx 3547 nginx 6u IPv4 10664 0t0 TCP *:http (LISTEN)

  发现是nginx程序,所以我们把nginx服务k掉,重新启动服(pinyin:fú)务。。命令如下:

  kill -9 3274

  kill -9 3547

  或[pinyin:huò]者 killall -9 nginx

  从新载入配置文{pinyin:wén}件(拼音:jiàn)启动 /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

  启动成功了但是发现(拼音:xiàn)一个错误信息

  [warn]: 51200 worker_connections are more than open file resource limit: 51200

  虽然不(读:bù)是致【繁:緻】命的问题 不影响nginx运行 但是看起来很烦人 我们来解决一下

  nginx.conf 配置问(拼音:wèn)题

  events {

  use epoll

  worker_connections 51200 // 这里出的【练:de】问题

  }

  问题原因是 Linux的最大文件澳门银河数限制。修改Linux 文件数限制(繁:製) ulimit -n 51200

  [root@localhost ~]# ulimit -n

  [root@localhost ~]#

  接下来(繁体:來)从新载入配置文件重启动Ok了....

  nginx error_log 错误日(练:rì)志配置说明

  nginx的error_log类型如下(从左到[dào]右:debug最详细 crit最少):

  [ debug | info | notice | warn | error | crit ]

  例《练:lì》如:error_log logs/nginx_error.log crit

  解释:日志文件存储在nginx安装目录下的 logs/nginx_error.log ,错(繁体:錯)误类(繁:類)型为 crit ,也[练:yě]就是记录最少错误信息

  注意error_log off并不能关闭日{读:rì}志记录功能,它将日志文件写入一个文件名为off的文件中(pinyin:zhōng),如果你想关闭错误日志记录功能,应使用以下配置:

  error_log /dev/null crit

  把存储位置设置到(dào)Linux的黑洞中去

  同样注意0.7.53版本,nginx在读取配置文件指{pinyin:zhǐ}定的错误日(rì)志路径前将使用编译的默认日志位置,如果运行nginx的用户对该位【pinyin:wèi】置没有写入权限,nginx将输出如下错误:

  [alert]: could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) log_not_found 语法:log_not_found on | off

  默认(繁体:認)值:on

  使[读:shǐ]用字段:location

  这个参数指定了是否记录客户端的请(繁体:請)求出现404错误的日志,通常用于不存在的robots.txt和favicon.ico文wén 件,例如: location = /robots.txt { log_not_found off }

  最后:所有nginx配置发生改变时,最《pinyin:zuì》好都使用如下命令测试配置是否错误后再使用 -s reload 重(zhòng)载

  # /usr/local/nginx/sbin/nginx –t

  说明(练:míng):

  1、# 代表root权限【读:xiàn】,不用输入

  2、以(读:yǐ)上是nginx的默认安装路径,如果(练:guǒ)改变了要相应的修改哦,例如 wdcp 的 lanmp 一键安装包 则如需要用如下命令【pinyin:lìng】

  # /www/wdlinux/nginx/sbin/nginx -s reload

  输入后如果提[tí]示如下,则表示配置无误:

  nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok

娱乐城

  nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

  这时再[pinyin:zài]使用重载(繁体:載)命令让Nginx平滑的重新加载配置即可,而不会影响[繁体:響]正常访问:

  # /usr/local/nginx/sbin/nginx -s reload

本文链接:http://10.21taiyang.com/Scooters/20833338.html
侠[繁体:俠]义道服务器架设转载请注明出处来源