User Tools

Site Tools


servers:linux:nginx:mybb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
servers:linux:nginx:mybb [2025/09/11 19:16] – [Server Block] Sean Rhoneservers:linux:nginx:mybb [2025/10/30 22:30] (current) – old revision restored (2025/10/16 23:52) Sean Rhone
Line 15: Line 15:
  
   * https://docs.mybb.com/1.8/install/requirements/   * https://docs.mybb.com/1.8/install/requirements/
 +  * https://docs.mybb.com/1.8/install/anonymous-statistics/
  
   sudo zypper install php-composer2   sudo zypper install php-composer2
Line 46: Line 47:
   GRANT ALL PRIVILEGES ON mybb.* to 'mybb'@'localhost';   GRANT ALL PRIVILEGES ON mybb.* to 'mybb'@'localhost';
  
-  FLUSH PRIVILEGES; +  FLUSH PRIVILEGES;EXIT;
- +
-  EXIT+
  
 ====== nginx + PHP-FPM Configuration ====== ====== nginx + PHP-FPM Configuration ======
Line 109: Line 108:
  
 ===== Server Block ===== ===== Server Block =====
- 
-  * https://docs.mybb.com/1.8/administration/configuring-search-engine-friendly-URLs/ 
  
   sudo -e '/etc/nginx/vhosts.d/forum.conf' && sudo systemctl reload 'nginx'   sudo -e '/etc/nginx/vhosts.d/forum.conf' && sudo systemctl reload 'nginx'
Line 129: Line 126:
 #    access_log  /var/log/nginx/forum-access.log; #    access_log  /var/log/nginx/forum-access.log;
 #    error_log  /var/log/nginx/forum-error.log; #    error_log  /var/log/nginx/forum-error.log;
- 
-    location / { 
-        rewrite ^/forum-([0-9]+)\.html$ /forumdisplay.php?fid=$1; 
-        rewrite ^/forum-([0-9]+)-page-([0-9]+)\.html$ /forumdisplay.php?fid=$1&page=$2; 
-        rewrite ^/thread-([0-9]+)\.html$ /showthread.php?tid=$1; 
-        rewrite ^/thread-([0-9]+)-page-([0-9]+)\.html$ /showthread.php?tid=$1&page=$2; 
-        rewrite ^/thread-([0-9]+)-lastpost\.html$ /showthread.php?tid=$1&action=lastpost; 
-        rewrite ^/thread-([0-9]+)-nextnewest\.html$ /showthread.php?tid=$1&action=nextnewest; 
-        rewrite ^/thread-([0-9]+)-nextoldest\.html$ /showthread.php?tid=$1&action=nextoldest; 
-        rewrite ^/thread-([0-9]+)-newpost\.html$ /showthread.php?tid=$1&action=newpost; 
-        rewrite ^/thread-([0-9]+)-post-([0-9]+)\.html$ /showthread.php?tid=$1&pid=$2; 
-        rewrite ^/post-([0-9]+)\.html$ /showthread.php?pid=$1; 
-        rewrite ^/announcement-([0-9]+)\.html$ /announcements.php?aid=$1; 
-        rewrite ^/user-([0-9]+)\.html$ /member.php?action=profile&uid=$1; 
-        rewrite ^/calendar-([0-9]+)\.html$ /calendar.php?calendar=$1; 
-        rewrite ^/calendar-([0-9]+)-year-([0-9]+)\.html$ /calendar.php?action=yearview&calendar=$1&year=$2; 
-        rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ /calendar.php?calendar=$1&year=$2&month=$3; 
-        rewrite ^/calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ /calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4; 
-        rewrite ^/calendar-([0-9]+)-week-(n?[0-9]+)\.html$ /calendar.php?action=weekview&calendar=$1&week=$2; 
-        rewrite ^/event-([0-9]+)\.html$ /calendar.php?action=event&eid=$1; 
-    } 
  
 } }
Line 162: Line 138:
  
   * TODO   * TODO
 +
 +===== Offline Message =====
 +
 +  * Configuration -> Settings -> Board Online / Offline
 +
 +<code>
 +These forums are being built behind-the-scenes, check back later!
 +<br />
 +In the meantime, check out my wiki: <a href="https://wiki.realmofespionage.xyz/">RoE | Wiki</a>
 +</code>
  
 ===== config.php ===== ===== config.php =====
  
-  sudo su 'wwwrun' -s '/bin/bash'+  * https://docs.mybb.com/1.8/administration/utf-8-setup/
  
-  nano '/srv/www/forum/inc/config.php'+  sudo -e '/srv/www/forum/inc/config.php' && sudo chown -v 'wwwrun':'www' '/srv/www/forum/inc/config.php'
  
 <code> <code>
-TODO</code>+$config['database']['encoding'] = 'utf8mb4';</code>
  
 ====== Services ====== ====== Services ======
Line 185: Line 171:
 Group=www Group=www
 Type=oneshot Type=oneshot
 +
 +Environment="COMPOSER_CACHE_DIR=/dev/null"
  
 ExecStart='/usr/bin/git' -C '/srv/www/forum' pull origin 'dev-1.9' ExecStart='/usr/bin/git' -C '/srv/www/forum' pull origin 'dev-1.9'
 +
 +ExecStart='/usr/bin/composer' --working-dir='/srv/www/forum' --no-cache install --no-dev
  
 ExecStartPost='/usr/bin/sync' ExecStartPost='/usr/bin/sync'
Line 312: Line 302:
 Type=oneshot Type=oneshot
  
 +ExecStart='/usr/bin/git' -C '/srv/www/forum' reset --hard
 ExecStart='/usr/bin/git' -C '/srv/www/forum' gc --aggressive --prune='all' ExecStart='/usr/bin/git' -C '/srv/www/forum' gc --aggressive --prune='all'
 ExecStart='/usr/bin/git' -C '/srv/www/forum' fsck --full --strict ExecStart='/usr/bin/git' -C '/srv/www/forum' fsck --full --strict
Line 368: Line 359:
   scp ~/'Downloads/mybb-files-'*'.tar.gz' espionage724@192.168.1.152:~   scp ~/'Downloads/mybb-files-'*'.tar.gz' espionage724@192.168.1.152:~
  
-  scp ~/'Downloads/mybb-database-'*'.sql' espionage724@192.168.1.152:~+  scp ~/'Downloads/mybb'*'.sql' espionage724@192.168.1.152:~
  
 ===== Stop nginx ===== ===== Stop nginx =====
Line 387: Line 378:
  
   sudo tar -xzf ~/'mybb-files-'*'.tar.gz' -C '/srv/www' 'forum' && sudo chown -R 'wwwrun':'www' '/srv/www/forum' && sudo chmod -R '0755' '/srv/www/forum'   sudo tar -xzf ~/'mybb-files-'*'.tar.gz' -C '/srv/www' 'forum' && sudo chown -R 'wwwrun':'www' '/srv/www/forum' && sudo chmod -R '0755' '/srv/www/forum'
 +
 +===== Git Fix =====
 +
 +  * :!: Set email for ''user.email''
 +
 +  sudo su 'wwwrun' -s '/bin/bash'
 +
 +  rm -Rf '/srv/www/forum/.git'
 +
 +  git -C '/srv/www/forum' init --initial-branch='dev-1.9'
 +
 +  git -C '/srv/www/forum' add '.'
 +
 +  git -C '/srv/www/forum' config 'user.email' 'espionage724@x'
 +
 +  git -C '/srv/www/forum' commit --message='x'
 +
 +  git -C '/srv/www/forum' remote add 'origin' 'https://github.com/mybb/mybb.git'
 +
 +  git -C '/srv/www/forum' pull --depth '1' --recurse-submodules 'origin' 'dev-1.9' --rebase
 +
 +  git -C '/srv/www/forum' reset --hard 'origin/dev-1.9'
 +
 +  git -C '/srv/www/forum' gc --aggressive --prune='all'
 +
 +  git -C '/srv/www/forum' fsck --full --strict
 +
 +  exit
  
 ===== Restore Database ===== ===== Restore Database =====
Line 396: Line 415:
   sudo mariadb --execute='CREATE DATABASE mybb;'   sudo mariadb --execute='CREATE DATABASE mybb;'
  
-  sudo mariadb 'mybb' < ~/'mybb-database-'*'.sql'+  sudo mariadb 'mybb' < ~/'mybb'*'.sql'
  
 ===== Start nginx ===== ===== Start nginx =====
Line 408: Line 427:
 **** ****
  
-  rm -fv ~/'mybb-files-'*'.tar.gz' ~/'mybb-database-'*'.sql'+  rm -fv ~/'mybb-files-'*'.tar.gz' ~/'mybb'*'.sql'
  
/usr/local/www/wiki/data/attic/servers/linux/nginx/mybb.1757632586.txt.gz · Last modified: by Sean Rhone

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki