| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| servers:windows:nginx:mybb [2025/11/20 10:33] – Sean Rhone | servers:windows:nginx:mybb [2025/11/29 00:44] (current) – [Back-up] Sean Rhone |
|---|
| * [[programs;windows;git|Git]] | * [[programs;windows;git|Git]] |
| * [[servers;windows;mariadb|MariaDB]] | * [[servers;windows;mariadb|MariaDB]] |
| |
| * TODO: ''listen = "127.0.0.1:9006"'' | |
| * :!: WIP | |
| |
| ====== Dependencies ====== | ====== Dependencies ====== |
| [PHP] | [PHP] |
| extension_dir = ".\ext" | extension_dir = ".\ext" |
| extension = "curl" | |
| extension = "gd" | |
| extension = "intl" | |
| extension = "ldap" | |
| extension = "mbstring" | |
| extension = "mysqli" | extension = "mysqli" |
| extension = "openssl" | |
| extension = "sodium" | |
| |
| error_reporting = "~E_ALL" | error_reporting = "~E_ALL" |
| display_errors = "Off" | display_errors = "Off" |
| | log_errors = "Off" |
| |
| [Date] | [Date] |
| fastcgi_param "HTTPS" "on"; | fastcgi_param "HTTPS" "on"; |
| |
| fastcgi_pass "127.0.0.1:9001"; | fastcgi_pass "127.0.0.1:9006"; |
| |
| } | } |
| listen "443" "ssl"; | listen "443" "ssl"; |
| http2 "on"; | http2 "on"; |
| server_name "realmofespionage.xyz"; | server_name "forums.realmofespionage.xyz"; |
| root "C:/www/main"; | root "C:/www/forum"; |
| index "index.php"; | index "index.php"; |
| |
| include "C:/www/nginx/default.d/main.conf"; | include "C:/www/nginx/default.d/forum.conf"; |
| include "C:/www/nginx/default.d/headers.conf"; | include "C:/www/nginx/default.d/headers.conf"; |
| |
| client_max_body_size "5M"; | # access_log "logs/forum-access.log"; |
| | # error_log "logs/forum-error.log"; |
| # access_log "logs/main-access.log"; | |
| # error_log "logs/main-error.log"; | |
| | |
| location "/api/" { | |
| try_files "$uri" "$uri/" "/api/index.php?$args"; | |
| } | |
| | |
| location "/" { | |
| try_files "$uri" "$uri/" "/index.php?$args"; | |
| } | |
| | |
| location "~*" "/(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$" { | |
| return "403"; | |
| error_page "403" "/403_error.html"; | |
| } | |
| | |
| location "~*" "\.(ico|pdf|flv)$" { | |
| expires "1y"; | |
| } | |
| | |
| location "~*" "\.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$" { | |
| expires "14d"; | |
| } | |
| | |
| } | } |
| SET "PHP_FCGI_CHILDREN=1" | SET "PHP_FCGI_CHILDREN=1" |
| |
| START "Forum PHP-CGI" "php-cgi.exe" -b "127.0.0.1:9001" -c "%SystemDrive%\www\php\forum.ini" -q | START "Forum PHP-CGI" /MIN "php-cgi.exe" -b "127.0.0.1:9006" -c "%SystemDrive%\www\php\forum.ini" -q |
| |
| :: End</code> | :: End</code> |
| TITLE Forum Updater | TITLE Forum Updater |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" reset --hard "origin/6.1-dev" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" reset --hard "origin/feature" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" pull origin "6.1-dev" --rebase | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" pull origin "feature" --rebase |
| |
| :: End</code> | :: End</code> |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * :!: TODO | * ''D:\Servers\Scheduled Backups'' |
| |
| "notepad.exe" "%SystemDrive%\www\scripts\forum\Back-up.bat" | "notepad.exe" "%SystemDrive%\www\scripts\forum\Back-up.bat" |
| <code> | <code> |
| @echo off | @echo off |
| | |
| | TITLE Forum Back-up |
| |
| :: User\Downloads | :: User\Downloads |
| "tar.exe" -czf "%UserProfile%\Downloads\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" | ::"tar.exe" -czf "%UserProfile%\Downloads\mybb-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" |
| | ::"%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "%UserProfile%\Downloads\%RANDOM%-mybb.sql" "mybb" |
| |
| :: NAS | :: NAS |
| ::"tar.exe" -czf "D:\Servers\Scheduled Backups\dokuwiki-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www\wiki" "data/pages" "data/meta" "data/media" "data/media_meta" "data/attic" "data/media_attic" "conf" | "tar.exe" -czf "D:\Servers\Scheduled Backups\mybb-files-auto-%RANDOM%.tar.gz" -C "%SystemDrive%\www" "forum" |
| | "%ProgramFiles%\MariaDB 12.2\bin\mariadb-dump.exe" -u "root" --opt -r "D:\Servers\Scheduled Backups\%RANDOM%-mybb.sql" "mybb" |
| |
| :: End</code> | :: End</code> |
| <code> | <code> |
| @echo off | @echo off |
| | |
| | TITLE Forum Git Fix |
| |
| RMDIR /S /Q "%SystemDrive%\www\forum\.git" | RMDIR /S /Q "%SystemDrive%\www\forum\.git" |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" init --initial-branch="6.1-dev" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" init --initial-branch="feature" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" add "." | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" add "." |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" config "user.email" "espionage724@x" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" config "user.email" "espionage724@x" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" commit --message="x" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" commit --message="x" |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" remote add "origin" "https://github.com/joomla/joomla-cms.git" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" remote add "origin" "https://github.com/mybb/mybb.git" |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" pull --depth "1" --recurse-submodules "origin" "6.1-dev" --rebase | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" pull --depth "1" --recurse-submodules "origin" "feature" --rebase |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" reset --hard "origin/6.1-dev" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" reset --hard "origin/feature" |
| |
| "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" gc --aggressive --prune="all" | "%ProgramFiles%\Git\bin\git.exe" -C "%SystemDrive%\www\forum" gc --aggressive --prune="all" |
| ===== Update ===== | ===== Update ===== |
| |
| * ''3:00:00 AM'' daily | * ''5:00:00 AM'' daily |
| |
| Main Update | Forum Update |
| |
| "%SystemDrive%\www\scripts\forum\Update.bat" | "%SystemDrive%\www\scripts\forum\Update.bat" |
| ===== Back-up ===== | ===== Back-up ===== |
| |
| * Weekly -> Recur every ''1'' weeks on ''Monday'' | * Monthly -> All months -> Days: ''6'' |
| * ''12:15:00 AM'' | * ''5:15:00 AM'' |
| * :!: TODO | |
| |
| Wiki File Back-up | Forum Back-up |
| |
| "%SystemDrive%\www\scripts\media\Back-up.bat" | "%SystemDrive%\www\scripts\forum\Back-up.bat" |
| |
| ===== Maintenance ===== | ===== Maintenance ===== |
| |
| * Monthly -> All months -> Days: ''4'' | * Monthly -> All months -> Days: ''6'' |
| * ''3:30:00 AM'' | * ''5:30:00 AM'' |
| |
| Main Maintenance | Forum Maintenance |
| |
| "%SystemDrive%\www\scripts\forum\Maintenance.bat" | "%SystemDrive%\www\scripts\forum\Maintenance.bat" |
| ====== Initial Setup ====== | ====== Initial Setup ====== |
| |
| * https://realmofespionage.xyz | * Database Engine: ''MySQL Improved'' |
| | * Database Server Hostname: ''localhost'' |
| | * Table Encoding: ''4-Byte UTF-8 Unicode'' |
| |
| ====== Settings ====== | * https://forums.realmofespionage.xyz |
| |
| ===== robots.txt ===== | ====== Configuration ====== |
| |
| **** | ===== Board Online / Offline ===== |
| |
| COPY /Y "%SystemDrive%\www\main\robots.txt.dist" "%SystemDrive%\www\main\robots.txt" | * Board Closed: ''[x]'' Yes |
| | |
| ===== Setup ===== | |
| | |
| * System -> Setup -> Global Configuration -> Site -> Site Offline: Enabled | |
| * System -> Setup -> Global Configuration -> Site -> Offline Message: Use Custom Message | |
| |
| <code> | <code> |
| This site is being built behind-the-scenes, check back later! | These forums are being built behind-the-scenes, check back later! |
| <br /> | <br /> |
| In the meantime, check out my wiki: <a href="https://wiki.realmofespionage.xyz/">RoE | Wiki</a></code> | In the meantime, check out my wiki: <a href="https://wiki.realmofespionage.xyz/">RoE | Wiki</a></code> |
| |
| ===== configuration.php ===== | ===== Login and Registration ===== |
| | |
| | * Disable Registrations: ''[x]'' Yes |
| | |
| | ===== config.php ===== |
| |
| **** | **** |
| |
| "notepad.exe" "%SystemDrive%\www\main\configuration.php" | "notepad.exe" "%SystemDrive%\www\forum\inc\config.php" |
| |
| ====== Files ====== | ====== Files ====== |