servers:bsd:nginx:drupal
Differences
This shows you the differences between two versions of the page.
servers:bsd:nginx:drupal [2025/05/16 23:25] – created Sean Rhone | servers:bsd:nginx:drupal [2025/08/28 22:16] (current) – removed Sean Rhone | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Information ====== | ||
- | |||
- | * Drupal ((https:// | ||
- | * [[Information: | ||
- | * https:// | ||
- | |||
- | * :!: WIP | ||
- | |||
- | ===== Prerequisites ===== | ||
- | |||
- | * [[bsd: | ||
- | * [[servers: | ||
- | * [[servers: | ||
- | * [[servers: | ||
- | |||
- | ====== Dependencies ====== | ||
- | |||
- | su - | ||
- | |||
- | pkg install git-lite php84-composer php84-dom php84-tokenizer php84-pdo php84-simplexml php84-xmlwriter php84-pdo_mysql php84-opcache | ||
- | |||
- | ====== Download Source ====== | ||
- | |||
- | * https:// | ||
- | * https:// | ||
- | |||
- | git clone --branch ' | ||
- | |||
- | ====== Database ====== | ||
- | |||
- | sudo mysql | ||
- | |||
- | CREATE DATABASE drupal; | ||
- | |||
- | GRANT ALL PRIVILEGES ON drupal.* to ' | ||
- | |||
- | FLUSH PRIVILEGES; | ||
- | |||
- | ====== nginx + PHP-FPM Configuration ====== | ||
- | |||
- | ===== PHP-FPM Socket ===== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [main] | ||
- | user = www-data | ||
- | group = www-data | ||
- | | ||
- | listen = / | ||
- | listen.owner = www-data | ||
- | listen.group = www-data | ||
- | listen.allowed_clients = 127.0.0.1 | ||
- | | ||
- | pm = dynamic | ||
- | pm.max_children = 5 | ||
- | pm.start_servers = 2 | ||
- | pm.min_spare_servers = 1 | ||
- | pm.max_spare_servers = 3 | ||
- | | ||
- | php_value[max_execution_time] = 300 | ||
- | php_value[request_terminate_timeout] = 300 | ||
- | |||
- | ===== FastCGI ===== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | location ~ ' | ||
- | fastcgi_split_path_info ^(.+? | ||
- | try_files $fastcgi_script_name =404; | ||
- | set $path_info $fastcgi_path_info; | ||
- | fastcgi_param PATH_INFO $path_info; | ||
- | include fastcgi.conf; | ||
- | fastcgi_intercept_errors on; | ||
- | fastcgi_index index.php; | ||
- | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
- | fastcgi_param HTTPS on; | ||
- | fastcgi_pass unix:/ | ||
- | fastcgi_read_timeout 300; | ||
- | } | ||
- | |||
- | ===== Server Block ===== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | server { | ||
- | listen ' | ||
- | server_name ' | ||
- | root '/ | ||
- | index ' | ||
- | | ||
- | include '/ | ||
- | include '/ | ||
- | | ||
- | #access_log / | ||
- | #error_log / | ||
- | | ||
- | location / { | ||
- | try_files $uri / | ||
- | } | ||
- | | ||
- | location @rewrite { | ||
- | rewrite ^/(.*)$ / | ||
- | } | ||
- | | ||
- | location ~ / | ||
- | deny all; | ||
- | return 404; | ||
- | } | ||
- | | ||
- | location ~ ^/ | ||
- | try_files $uri @rewrite; | ||
- | } | ||
- | | ||
- | location ~ ^/ | ||
- | try_files $uri / | ||
- | } | ||
- | } | ||
- | |||
- | |||
- | ==== Enable Server Block ===== | ||
- | |||
- | **** | ||
- | |||
- | sudo rm -f '/ | ||
- | |||
- | ====== Initial Setup ====== | ||
- | |||
- | * https:// | ||
- | |||
- | ====== Plugins ====== | ||
- | |||
- | ===== T3 Framework ===== | ||
- | |||
- | * https:// | ||
- | * 2.6.1 | ||
- | |||
- | ===== Purity III Template ===== | ||
- | |||
- | * https:// | ||
- | * Requires [[servers: | ||
- | * 1.1.7 | ||
- | |||
- | ====== Settings ====== | ||
- | |||
- | ===== Global Configuration ===== | ||
- | |||
- | ==== Site Meta Description ==== | ||
- | |||
- | **** | ||
- | |||
- | Realm of Espionage is an internet community with the main focus points of gaming, transparency, | ||
- | |||
- | ==== Site Meta Keywords ==== | ||
- | |||
- | **** | ||
- | |||
- | privacy, | ||
- | |||
- | ==== Content Rights ==== | ||
- | |||
- | **** | ||
- | |||
- | Creative Commons Attribution-ShareAlike 4.0 International | ||
- | |||
- | ===== Articles ===== | ||
- | |||
- | * TODO (there' | ||
- | |||
- | ===== Purity III ===== | ||
- | |||
- | ==== Edit Style ==== | ||
- | |||
- | * Show T3 Logo = Off ((if shown, it causes a 3rd-party asset to be loaded; why they didn't just include it in the theme files is beyond me)) | ||
- | * Logo Type = Text | ||
- | * Megamenu Animation = Fading (300ms) | ||
- | * Off-canvas Sidebar = Off ((it doesn' | ||
- | |||
- | ==== Theme Magic ==== | ||
- | |||
- | * Brand Primary Color = ''# | ||
- | * Footer Background = ''# | ||
- | * Footer Text Color = ''# | ||
- | |||
- | ====== Footer ====== | ||
- | |||
- | ==== Copyright ==== | ||
- | |||
- | * Requires [[servers: | ||
- | |||
- | === Logo === | ||
- | |||
- | **** | ||
- | |||
- | sudo -u ' | ||
- | |||
- | === Text === | ||
- | |||
- | * Place text within the ''< | ||
- | * Remove '' | ||
- | |||
- | sudo -u ' | ||
- | |||
- | < | ||
- | This site is powered by <a href=" | ||
- | </ | ||
- | < | ||
- | Dark <a href=" | ||
- | </ | ||
- | < | ||
- | <img src=" | ||
- | </ | ||
- | |||
- | ==== Position Fix ==== | ||
- | |||
- | * This places the footer back at the bottom of the screen instead of floating half-way up the page when little content exists | ||
- | * Requires [[servers: | ||
- | |||
- | sudo -u ' | ||
- | |||
- | /* Footer Styling */ | ||
- | | ||
- | .t3-copyright { | ||
- | background: #484848 none repeat scroll 0 0; | ||
- | border-top: 1px solid #eeeeee; | ||
- | bottom: 0; | ||
- | font-size: 12px; | ||
- | left: 0; | ||
- | padding: 15px 0 0px; | ||
- | position: fixed; | ||
- | width: 100%; | ||
- | } | ||
- | | ||
- | .t3-footer { | ||
- | / | ||
- | bottom: 0; | ||
- | font-size: 12px; | ||
- | left: 0; | ||
- | } | ||
- | |||
- | ====== Services ====== | ||
- | |||
- | ===== Updater ===== | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [Service] | ||
- | User=www-data | ||
- | Group=www-data | ||
- | Type=oneshot | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | |||
- | ==== Timer ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [Unit] | ||
- | Description=Joomla! Git Updater | ||
- | Wants=network-online.target | ||
- | | ||
- | [Timer] | ||
- | OnCalendar=*-*-* 01:35:00 | ||
- | Persistent=true | ||
- | | ||
- | [Install] | ||
- | WantedBy=timers.target | ||
- | |||
- | ===== Backup ===== | ||
- | |||
- | ==== Database Auth ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [mysqldump] | ||
- | user=joomla | ||
- | password=x | ||
- | |||
- | ==== Service ==== | ||
- | |||
- | mkdir -p ~/' | ||
- | |||
- | [Service] | ||
- | Type=oneshot | ||
- | WorkingDirectory=/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | ExecStart='/ | ||
- | |||
- | ==== Timer ==== | ||
- | |||
- | sudo -e '/ | ||
- | |||
- | [Unit] | ||
- | Description=Joomla! Database Backup | ||
- | After=mysql.service | ||
- | | ||
- | [Timer] | ||
- | OnCalendar=*-*-* 01:40:00 | ||
- | Persistent=true | ||
- | | ||
- | [Install] | ||
- | WantedBy=timers.target | ||
- | |||
- | ====== Backup ====== | ||
- | |||
- | * Create backup archive on server and transfer to client computer | ||
- | |||
- | ===== Server ===== | ||
- | |||
- | ==== Stop Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl stop nginx php7.0-fpm | ||
- | |||
- | ==== Backup Folder ==== | ||
- | |||
- | **** | ||
- | |||
- | cd '/ | ||
- | |||
- | ==== Backup Database ==== | ||
- | |||
- | **** | ||
- | |||
- | mysqldump --defaults-extra-file='/ | ||
- | |||
- | ==== Start Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl start nginx php7.0-fpm | ||
- | |||
- | ===== Client ===== | ||
- | |||
- | ==== Transfer Files To Client ==== | ||
- | |||
- | **** | ||
- | |||
- | scp espionage724@192.168.1.153: | ||
- | |||
- | ====== Restore ====== | ||
- | |||
- | ===== Client ===== | ||
- | |||
- | ==== Transfer Files To Server ==== | ||
- | |||
- | **** | ||
- | |||
- | scp ~/' | ||
- | |||
- | ==== Remove Files ==== | ||
- | |||
- | **** | ||
- | |||
- | rm ~/' | ||
- | |||
- | ===== Server ===== | ||
- | |||
- | ==== Stop Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl stop nginx php7.0-fpm | ||
- | |||
- | ==== Remove Previous Folder ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo rm -Rf '/ | ||
- | |||
- | ==== Restore Joomla! Folder ==== | ||
- | |||
- | **** | ||
- | |||
- | cd '/ | ||
- | |||
- | ==== Drop Previous Database ==== | ||
- | |||
- | sudo mysql | ||
- | |||
- | DROP DATABASE joomla; | ||
- | |||
- | FLUSH TABLES; | ||
- | |||
- | ==== Re-create Databases ==== | ||
- | |||
- | sudo mysql | ||
- | |||
- | CREATE DATABASE joomla; | ||
- | |||
- | ==== Restore Database ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo mysql ' | ||
- | |||
- | ==== Reapply Permissions ==== | ||
- | |||
- | sudo mysql | ||
- | |||
- | GRANT ALL PRIVILEGES ON joomla.* to ' | ||
- | |||
- | FLUSH PRIVILEGES; | ||
- | |||
- | ==== Start Services ==== | ||
- | |||
- | **** | ||
- | |||
- | sudo systemctl start nginx php7.0-fpm | ||
- | |||
- | ==== Remove Backups ==== | ||
- | |||
- | * Verify that Joomla! works before running | ||
- | |||
- | rm ~/' | ||
/usr/local/www/wiki/data/attic/servers/bsd/nginx/drupal.1747452332.txt.gz · Last modified: by Sean Rhone