-
Notifications
You must be signed in to change notification settings - Fork 94
web_windows
title: Development Web Server for Windows description: Manual setup and configuration of the web services for Windows published: true date: 2023-03-16T22:56:50.185Z tags: editor: markdown dateCreated: 2021-06-03T23:52:46.381Z
- Latest MariaDB (https://downloads.mariadb.org/mariadb/+releases/ — mariadb-10.5.10-winx64.zip)
- Latest PHP 7 (https://windows.php.net/downloads/releases/ — php-7.4.20-Win32-vc15-x64.zip)
- Latest nginx (http://nginx.org/en/download.html — nginx-1.21.6.zip)
- Latest phpMyAdmin (phpMyAdmin-5.1.0-all-languages.zip)
-
Y:\ryzomcore
- code: https://github.com/ryzom/ryzomcore
-
external
- dependencies/Dependencies.exe, ...
- mariadb/bin/mysqld.exe, ...
- nginx/nginx.exe, ...
- perl/perl.exe, ...
- php/php-cgi.exe, ...
- phpmyadmin/index.php, ...
- python3/python.exe, ...
- python27/python.exe, ...
- rrdtool/rrdtool.exe, ...
- utils/7za.exe, ...
-
pipeline
-
shard_dev
- mysql: Storage for MariaDB
- www: Storage for WebIG, accessible by shard unifier (MFS, etc)
-
shard_dev
Set up MariaDB on port 9040, PHP-CGI on port 9041, and nginx on port 9042.
Replace
Y:\ryzomcore
with your installation path. {.is-info}
Create the required storage directories in advance. Open a console window, and create an empty database in the data directory.
cd Y:\ryzomcore\external\mariadb
.\bin\mysql_install_db --default-user --datadir=..\..\pipeline\shard_dev\mysql
Then, launch MariaDB on port 9040, using the data directory, with a unicode character set.
.\bin\mysqld --no-defaults --port=9040 --datadir=..\..\pipeline\shard_dev\mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --console --standalone
To test the installation, use .\bin\mysql --port=9040
to connect manually to the server.
Copy copy php.ini-development
to php.ini
.
Search for extension=
, and enable the following extensions.
extension=gd2
extension=mbstring
extension=mysqli
extension=openssl
extension=pdo_mysql
Set extension_dir
to the recommended Windows value.
extension_dir = "ext"
Launch PHP-CGI on port 9041.
cd Y:\ryzomcore\external\php
php-cgi.exe -b 127.0.0.1:9041
Put the following contents into nginx.conf
.
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 9042;
server_name localhost;
root Y:/ryzomcore/code/web/public_php;
index index.php index.html index.htm;
location ~ /\.ht {
deny all;
}
location /phpmyadmin {
root Y:/ryzomcore/external;
location ~ ^/phpmyadmin/(.+\.php)$ {
fastcgi_pass 127.0.0.1:9041;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9041;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
Launch nginx.
cd Y:\ryzomcore\external\nginx
nginx
Browse to http://localhost:9042/.
Set the SQL Port to 9040
, domain name to dev
, domain database to ring_dev
, and the Users Directory to Y:/ryzomcore/pipeline/shard_dev/www
.
Configure. Check for errors.
You can now access http://localhost:9042/admin/ and http://localhost:9042/ams/ using admin
as user and password.
Accounts for the admin tool (nel_tool
) are separate from game accounts in the nel
database.
Browse to http://localhost:9042/phpmyadmin/setup/.
Push the New server button.
Change the port to 9040, and enable "Allow logins without a password".
Save, push the Download button, and move the downloaded config.inc.php
file into the phpmyadmin
folder.
Refresh to verify that setup is now disabled.
Remove cookies for localhost, and login at http://localhost:9042/phpmyadmin/, with user root
and no password, to access the databases.
Go to http://localhost:9042/phpmyadmin/index.php?route=/check-relations, or click the "Find out why" link at the bottom of the phpMyAdmin dashboard, and click Create, to create the phpmyadmin
table.
Press the Settings cog icon, disable "Show databases navigation as tree", and Apply.
cd Y:\ryzomcore\external\nginx
.\nginx -s stop
taskkill /f /im nginx.exe
taskkill /f /im php-cgi.exe
cd Y:\ryzomcore\external\mariadb
.\bin\mysqladmin -u root shutdown