User Tools

Site Tools


servers:bsd:nginx:piwigo

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:bsd:nginx:piwigo [2025/05/16 21:05] Sean Rhoneservers:bsd:nginx:piwigo [2025/05/16 21:55] (current) – [config.inc.php] Sean Rhone
Line 3: Line 3:
   * Piwigo ((https://piwigo.org/))   * Piwigo ((https://piwigo.org/))
   * Bootstrap Darkroom Theme ((https://github.com/Piwigo/piwigo-bootstrap-darkroom))   * Bootstrap Darkroom Theme ((https://github.com/Piwigo/piwigo-bootstrap-darkroom))
-  * ''master'' Branches ((https://github.com/Piwigo/Piwigo/tree/master)) ((https://github.com/Piwigo/piwigo-bootstrap-darkroom/tree/master)) 
   * [[Information:Realm of Espionage]]   * [[Information:Realm of Espionage]]
   * https://media.realmofespionage.xyz   * https://media.realmofespionage.xyz
- 
-  * :!: WIP 
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 31: Line 28:
   * https://github.com/Piwigo/piwigo-bootstrap-darkroom/commits/master/   * https://github.com/Piwigo/piwigo-bootstrap-darkroom/commits/master/
  
-  sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/Piwigo/Piwigo.git' '/var/www/media' && sudo git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/Piwigo/piwigo-bootstrap-darkroom.git' '/var/www/media/themes/bootstrap_darkroom' && sudo semanage fcontext --add --type 'httpd_sys_rw_content_t' '/var/www/media(/.*)?' && sudo restorecon -F -I -R '/var/www/media' && sudo chown -R 'nginx':'nginx' '/var/www/media' && sync+  su - 
 + 
 +  git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/Piwigo/Piwigo.git' '/usr/local/www/media' && chown -R 'www':'www' '/usr/local/www/media' && sync 
 + 
 +  git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/Piwigo/piwigo-bootstrap-darkroom.git' '/usr/local/www/media/themes/bootstrap_darkroom' && chown -R 'www':'www' '/usr/local/www/media' && sync
  
 ====== Database ====== ====== Database ======
Line 51: Line 52:
 ===== PHP-FPM Socket ===== ===== PHP-FPM Socket =====
  
-  sudo -'/etc/php-fpm.d/media.conf' && sudo systemctl restart 'php-fpm'+  su - 
 + 
 +  ee '/usr/local/etc/php-fpm.d/media.conf' && service 'php_fpmrestart
  
 <code> <code>
Line 57: Line 60:
  
 ; User/Group ; User/Group
-user = nginx +user = www 
-group = nginx+group = www
  
 ; Socket ; Socket
-listen = /run/php-fpm/media.sock +listen = 127.0.0.1:9003
-listen.acl_users = nginx+
 listen.allowed_clients = 127.0.0.1 listen.allowed_clients = 127.0.0.1
  
Line 69: Line 71:
 pm.max_children = 4 pm.max_children = 4
 pm.process_idle_timeout = 30 pm.process_idle_timeout = 30
- 
-; Fedora php.ini Defaults 
-php_value[session.save_handler] = "files" 
-php_value[session.save_path] = "/var/lib/php/session" 
  
 ; General ; General
Line 86: Line 84:
 ===== FastCGI ===== ===== FastCGI =====
  
-  sudo -'/etc/nginx/default.d/media.conf'+  su - 
 + 
 +  ee '/usr/local/etc/nginx/default.d/media.conf'
  
 <code> <code>
Line 97: Line 97:
     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_pass unix:/run/php-fpm/media.sock+    fastcgi_param HTTPS on; 
-}</code>+    fastcgi_pass 127.0.0.1:9003
 +} 
 + 
 +# End</code>
  
 ===== Server Block ===== ===== Server Block =====
  
-  * 2023/09/12: CSPs disabled; TODO: Re-figure out CSPs+  su -
  
-  sudo -e '/etc/nginx/vhosts.d/media.conf' && sudo systemctl reload 'nginx' && sync+  ee '/usr/local/etc/nginx/vhosts.d/media.conf' && service 'nginx' reload && sync
  
 <code> <code>
 server { server {
-    listen '443' 'ssl' 'http2';+    listen '443' 'ssl'
 +#    http2 'on';
     server_name 'media.realmofespionage.xyz';     server_name 'media.realmofespionage.xyz';
-    root '/var/www/media';+    root '/usr/local/www/media';
     index 'index.php';     index 'index.php';
  
-    include '/etc/nginx/default.d/media.conf'; +    include '/usr/local/etc/nginx/default.d/media.conf'; 
-    include '/etc/nginx/default.d/headers.conf';+    include '/usr/local/etc/nginx/default.d/headers.conf';
  
 #    add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'" always; #    add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'" always;
Line 132: Line 136:
     }     }
  
-}</code>+} 
 + 
 +# End</code>
  
 ====== Initial Setup ====== ====== Initial Setup ======
Line 172: Line 178:
 // Minimal Logging // Minimal Logging
 $conf['log_level'] = 'EMERGENCY'; $conf['log_level'] = 'EMERGENCY';
 +
 +// Hide PHP Warnings
 +$conf['show_php_errors'] = E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING;
  
 // Header Links // Header Links
Line 177: Line 186:
   'https://realmofespionage.xyz' => 'Realm of Espionage',   'https://realmofespionage.xyz' => 'Realm of Espionage',
   'https://wiki.realmofespionage.xyz' => 'RoE | Wiki',   'https://wiki.realmofespionage.xyz' => 'RoE | Wiki',
-  'https://social.realmofespionage.xyz/profile/espionage724' => 'RoE | Social', 
   'https://blog.realmofespionage.xyz' => 'RoE | Blog',   'https://blog.realmofespionage.xyz' => 'RoE | Blog',
-  'https://wiki.realmofespionage.xyz/personal:social_media' => 'Webmaster Info', +  'https://wiki.realmofespionage.xyz/user:espionage724' => 'Webmaster Info', 
-  'https://wiki.realmofespionage.xyz/servers:nginx:piwigo' => 'Instance Configuration Notes',+  'https://wiki.realmofespionage.xyz/servers:bsd:nginx:piwigo' => 'Instance Configuration Notes',
   );   );
  
Line 219: Line 227:
  
   su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media' fsck --full --strict"   su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media' fsck --full --strict"
- 
-  su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media' rm --cached -r ." 
- 
-  su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media' add --renormalize ." 
  
 ==== Theme ==== ==== Theme ====
Line 235: Line 239:
  
   su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media/themes/bootstrap_darkroom' fsck --full --strict"   su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media/themes/bootstrap_darkroom' fsck --full --strict"
- 
-  su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media/themes/bootstrap_darkroom' rm --cached -r ." 
- 
-  su -m 'www' -c "'/usr/local/bin/git' -C '/usr/local/www/media/themes/bootstrap_darkroom' add --renormalize ." 
  
 ====== Services ====== ====== Services ======
/usr/local/www/wiki/data/attic/servers/bsd/nginx/piwigo.1747443933.txt.gz · Last modified: by Sean Rhone