注册网站
环境安装
1.源安装
1
| apt update && apt install nginx php-fpm php-gmp php-gd php-soap php-mbstring php-pdo php-pdo-mysql
|
然后输入 vim /etc/nginx/sites-available/default
,将 location ~ \.php$ {
、include snippets/fastcgi-php.conf;
、fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
和下面的} 前面的#去掉。
并在 index
后面输入 index.php
。
退出编辑后,输入 service nginx restart && service php7.4-fpm restart
重启服务。
2.Docker安装
下载Dockerfile,使用 docker build
构建自己的镜像,根据自身情况修改下面compose的参数。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| version: "2.1" services: nginx: image: lscr.io/linuxserver/nginx:latest container_name: nginx environment: - PUID=1000 - PGID=1000 - TZ=Asia/Shanghai volumes: - ./config:/config ports: - 80:80 - 443:443 restart: unless-stopped
|
网站搭建
注册网站推荐 WoWSimpleRegistration,点击此处下载压缩包解压,将 application/config/
内的 config.php.sample
文件复制并重命名为 config.php
,config.php
文件就是该源码的配置文件。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| ===================================================================== $config['baseurl'] = "localhost"; ===================================================================== ===================================================================== $config['language'] = "chinese-simplified"; ===================================================================== $config['realmlist'] = 'IP地址'; $config['patch_location'] = 'http://mypatch.com/patch.mpq'; ===================================================================== $config['expansion'] = '2'; ===================================================================== $config['server_core'] = 1; ===================================================================== $config['disable_changepassword'] = true; ===================================================================== $config['template'] = 'advance'; =====================================================================
$config['smtp_host'] = 'smtp1.example.com'; $config['smtp_port'] = 587; $config['smtp_auth'] = true; $config['smtp_user'] = '[email protected]'; $config['smtp_pass'] = 'SECRET'; $config['smtp_secure'] = 'tls'; $config['smtp_mail'] = '[email protected]'; ===================================================================== $config['soap_for_register'] = true; ===================================================================== $config['soap_uri'] = 'urn:AC'; ===================================================================== $config['soap_username'] = 'Ikun'; $config['soap_password'] = 'password'; =====================================================================
$config['db_auth_host'] = '127.0.0.1'; $config['db_auth_port'] = '3306'; $config['db_auth_user'] = 'root'; $config['db_auth_pass'] = 'password'; $config['db_auth_dbname'] = 'acore_auth'; =====================================================================
$config['realmlists'] = array( "1" => array( 'realmid' => 1, // Realm ID 'realmname' => "Ikun", // Realm Name 'db_host' => "127.0.0.1", // MySQL Host IP 'db_port' => "3306", // MySQL Host Port 'db_user' => "root", // MySQL username 'db_pass' => 'password', // MySQL password 'db_name' => "acore_characters" // Characters database name
|
Docker安装方式:将修改后的文件全部复制到./config/www/
目录下。
开启 SOAP
输入 vim /root/azeroth-server/etc/worldserver.conf
命令,然后输入 /SOAP
查找 SOAP 值,找到 SOAP.Enabled = 0
后回车按 i 键,修改为 SOAP.Enabled = 1
,按 Esc 键输入:wq
后即可保存退出,重启服务端后即可使用网站注册账号。
防火墙配置
魔兽世界服务端所需的端口为3306
3724
,注册网站所需要的端口为80
。如果按以上教程搭建,外网仍无法访问,请自行查看服务器防火墙是否放行上述端口。