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
servers:linux:nginx:mybb [2026/01/09 16:26] – [Information] Sean Rhoneservers:linux:nginx:mybb [2026/05/01 06:22] (current) Sean Rhone
Line 22: Line 22:
  
   * https://github.com/mybb/mybb/commits/feature/   * https://github.com/mybb/mybb/commits/feature/
 +  * https://github.com/mybb/mybb/branches
  
   sudo git clone --branch 'feature' --depth '1' --recurse-submodules 'https://github.com/mybb/mybb.git' '/srv/www/forum' && sudo chown -R 'wwwrun':'www' '/srv/www/forum' && sudo chmod -R '0755' '/srv/www/forum'   sudo git clone --branch 'feature' --depth '1' --recurse-submodules 'https://github.com/mybb/mybb.git' '/srv/www/forum' && sudo chown -R 'wwwrun':'www' '/srv/www/forum' && sudo chmod -R '0755' '/srv/www/forum'
Line 45: Line 46:
 <code> <code>
 [forum] [forum]
- 
-; User/Group 
 user = "wwwrun" user = "wwwrun"
 group = "www" group = "www"
  
-; Socket 
 listen = "/run/php-fpm/forum.sock" listen = "/run/php-fpm/forum.sock"
 listen.owner = "wwwrun" listen.owner = "wwwrun"
Line 56: Line 54:
 listen.mode = "0662" listen.mode = "0662"
  
-; Process Management 
 pm = "ondemand" pm = "ondemand"
 pm.max_children = "4" pm.max_children = "4"
 pm.process_idle_timeout = "30" pm.process_idle_timeout = "30"
  
-; Logging 
 php_value[log_errors] = "0" php_value[log_errors] = "0"
 php_value[error_reporting] = "~E_ALL" php_value[error_reporting] = "~E_ALL"
 +php_value[display_errors] = "0"
 +php_value[display_startup_errors] = "0"
 +php_value[html_errors] = "0"
  
-; openSUSE php.ini Defaults 
 php_value[session.save_path] = "/var/lib/php8/sessions" php_value[session.save_path] = "/var/lib/php8/sessions"
- 
-; General 
 php_value[date.timezone] = "America/New_York" php_value[date.timezone] = "America/New_York"
  
Line 78: Line 74:
  
 <code> <code>
-location '~' '\.(php|phar)(/.*)?$'+ location '~' '\.(php|phar)(/.*)?$'
- +  fastcgi_split_path_info '^(.+\.(?:php|phar))(/.*)$'; 
- fastcgi_split_path_info '^(.+\.(?:php|phar))(/.*)$'; +  fastcgi_intercept_errors 'on'; 
- fastcgi_intercept_errors 'on'; +  fastcgi_index 'index.php'; 
- fastcgi_index 'index.php'; +  include 'fastcgi_params'; 
- include 'fastcgi_params'; +  fastcgi_param 'SCRIPT_FILENAME' '$document_root$fastcgi_script_name'; 
- fastcgi_param 'SCRIPT_FILENAME' '$document_root$fastcgi_script_name'; +  fastcgi_param 'PATH_INFO' '$fastcgi_path_info'; 
- fastcgi_param 'PATH_INFO' '$fastcgi_path_info'; +  fastcgi_param 'HTTPS' 'on'; 
- fastcgi_param 'HTTPS' 'on'; +  fastcgi_pass 'unix:/run/php-fpm/forum.sock'; 
- + }
- fastcgi_pass 'unix:/run/php-fpm/forum.sock'; +
- +
-}+
  
 # End</code> # End</code>
Line 102: Line 95:
 <code> <code>
 server { server {
- 
  listen '443' 'ssl';  listen '443' 'ssl';
  http2 'on';  http2 'on';
Line 140: Line 132:
   rewrite '^/event-([0-9]+)\.html$' '/calendar.php?action=event&eid=$1';   rewrite '^/event-([0-9]+)\.html$' '/calendar.php?action=event&eid=$1';
  }  }
- 
 } }
  
Line 177: Line 168:
  
   sudo -e '/srv/www/forum/inc/config.php' && sudo chown -v 'wwwrun':'www' '/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'
- 
-====== Scripts ====== 
- 
-===== Git Fix ===== 
- 
-  * :!: Set email for ''user.email'' 
- 
-  sudo mkdir -p '/etc/nginx/scripts/forum' && sudo -e '/etc/nginx/scripts/forum/git-fix.sh' && sudo chmod '0500' '/etc/nginx/scripts/forum/git-fix.sh' && sudo chown 'wwwrun':'www' '/etc/nginx/scripts/forum/git-fix.sh' 
- 
-<code> 
-#!/bin/bash 
- 
-cd '/tmp' 
- 
-'/usr/bin/rm' -Rf '/srv/www/forum/.git' 
-'/usr/bin/git' -C '/srv/www/forum' init --initial-branch='feature' 
-'/usr/bin/git' -C '/srv/www/forum' add '.' 
- 
-######################################## 
-'/usr/bin/git' -C '/srv/www/forum' config 'user.email' 'espionage724@x' 
-######################################## 
- 
-'/usr/bin/git' -C '/srv/www/forum' commit --message='x' 
- 
-'/usr/bin/git' -C '/srv/www/forum' remote add 'origin' 'https://github.com/mybb/mybb.git' 
-'/usr/bin/git' -C '/srv/www/forum' pull --depth '1' --recurse-submodules 'origin' 'feature' --rebase 
- 
-'/usr/bin/git' -C '/srv/www/forum' reset --hard 'origin/feature' 
-'/usr/bin/git' -C '/srv/www/forum' gc --aggressive --prune='all' 
-'/usr/bin/git' -C '/srv/www/forum' fsck --full --strict 
- 
-# End</code> 
- 
-==== Execute ==== 
- 
-  sudo su 'wwwrun' -s '/bin/bash' 
- 
-  '/etc/nginx/scripts/forum/git-fix.sh' 
- 
-  exit 
  
 ====== Services ====== ====== Services ======
Line 232: Line 183:
 Type=oneshot Type=oneshot
  
-WorkingDirectory=/srv/www/forum+WorkingDirectory=/tmp
  
 ExecStart='/usr/bin/git' -C '/srv/www/forum' reset --hard 'origin/feature' ExecStart='/usr/bin/git' -C '/srv/www/forum' reset --hard 'origin/feature'
 ExecStart='/usr/bin/git' -C '/srv/www/forum' pull origin 'feature' --rebase ExecStart='/usr/bin/git' -C '/srv/www/forum' pull origin 'feature' --rebase
- 
-ExecStartPost='/usr/bin/sync' 
  
 # End</code> # End</code>
Line 442: Line 391:
  
   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'
 +
 +===== Restore Database =====
 +
 +  * [[#database|Initial set-up]]
 +
 +  sudo mariadb --execute='DROP DATABASE mybb;'
 +
 +  sudo mariadb --execute='CREATE DATABASE mybb;'
 +
 +  sudo mariadb 'mybb' < ~/'mybb'*'.sql'
  
 ===== Git Fix ===== ===== Git Fix =====
Line 449: Line 408:
   sudo su 'wwwrun' -s '/bin/bash'   sudo su 'wwwrun' -s '/bin/bash'
  
-  rm -Rf '/srv/www/forum/.git'+  cd '/tmp' && rm -Rf '/srv/www/forum/.git'
  
   git -C '/srv/www/forum' init --initial-branch='feature'   git -C '/srv/www/forum' init --initial-branch='feature'
Line 470: Line 429:
  
   exit   exit
- 
-===== Restore Database ===== 
- 
-  * [[#database|Initial set-up]] 
- 
-  sudo mariadb --execute='DROP DATABASE mybb;' 
- 
-  sudo mariadb --execute='CREATE DATABASE mybb;' 
- 
-  sudo mariadb 'mybb' < ~/'mybb'*'.sql' 
  
 ===== Start nginx ===== ===== Start nginx =====
/srv/www/wiki/data/pages/servers/linux/nginx/mybb.txt · 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