User Tools

Site Tools


windows:servers:nginx:grav

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
windows:servers:nginx:grav [2024/06/28 18:22] – [PHP-CGI] Sean Rhonewindows:servers:nginx:grav [2024/08/13 18:42] (current) – removed Sean Rhone
Line 1: Line 1:
-====== Information ====== 
- 
-  * Grav ((https://getgrav.org/)) 
-  * develop ((https://github.com/getgrav/grav/tree/develop)) 
-  * [[Information:Realm of Espionage]] 
-  * https://realmofespionage.xyz 
- 
-===== Prerequisites ===== 
- 
-  * [[windows:10|Windows 10]] 
-  * [[windows;servers;nginx_php_php-cgi|nginx + PHP + PHP-CGI]] 
-  * [[windows;servers;nginx;lets_encrypt|Certbot (Let's Encrypt)]] 
- 
-===== Notes ===== 
- 
-  * :!: 2024/06/28: WIP 
- 
-====== Dependencies ====== 
- 
-  * https://learn.getgrav.org/17/basics/requirements 
- 
-===== Git ===== 
- 
-  * https://www.git-scm.com/download/win 
-  * Last tested: ''Git-2.45.2-64-bit.exe'' 
- 
-  * Git from the command line and also from 3rd-party software 
- 
-===== Composer ===== 
- 
-  * https://getcomposer.org/download/ 
-  * Last tested version: ''v2.7.7'' 
- 
-====== Download Source ====== 
- 
-  git clone --branch "develop" --depth "1" --recurse-submodules "https://github.com/getgrav/grav.git" "C:\www\main" 
- 
-  explorer "C:\www\main" 
- 
-====== Environment ====== 
- 
-===== PHP ===== 
- 
-  notepad++ "%SystemDrive%\www\php\main-php.ini" 
- 
-<code> 
-[PHP] 
-extension_dir = ".\ext" 
-extension="curl" 
-extension="gd" 
-extension="mbstring" 
-extension="openssl" 
-extension="zip" 
- 
-[Date] 
-date.timezone = "America/New_York"</code> 
- 
-===== Composer ===== 
- 
-**** 
- 
-  CD "%SystemDrive%\www\main\" && php -c "%SystemDrive%\www\php\main-php.ini" "%ProgramData%\ComposerSetup\bin\composer.phar" install --no-dev -o 
- 
-===== Grav CLI ===== 
- 
-**** 
- 
-  CD "%SystemDrive%\www\main\" && php "%SystemDrive%\www\main\bin\grav" install 
- 
-====== nginx + PHP-CGI Configuration ====== 
- 
-===== PHP-CGI ===== 
- 
-  * https://github.com/getgrav/grav/blob/master/webserver-configs/nginx.conf 
- 
-  notepad++ "%SystemDrive%\www\nginx-default.d\main.conf" 
- 
-<code> 
-# PHP-CGI 
-    location ~ \.php$ { 
-        fastcgi_pass 127.0.0.1:9001; 
-        fastcgi_split_path_info ^(.+\.php)(/.+)$; 
-        fastcgi_index index.php; 
-        include fastcgi_params; 
-        fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; 
-        fastcgi_intercept_errors on; 
-        fastcgi_param PATH_INFO $fastcgi_path_info; 
-        fastcgi_param HTTPS on; 
-    }</code> 
- 
-==== Process ==== 
- 
-===== Server Block ===== 
- 
-  notepad++ "%SystemDrive%\www\nginx-vhosts.d\main.conf" 
- 
-<code> 
-server { 
-    listen "443" "ssl"; 
-    http2 "on"; 
-    server_name "realmofespionage.xyz"; 
-    root "C:/www/main"; 
-    index "index.php"; 
- 
-    include C:/www/nginx-default.d/main.conf; 
-    include C:/www/nginx-default.d/headers.conf; 
- 
-    client_max_body_size "30M"; 
- 
-#    add_header Content-Security-Policy "default-src "self"; script-src "self" "unsafe-inline" "unsafe-eval"; style-src "self" "unsafe-inline"" always; 
- 
-#    access_log  logs/main-access.log; 
-#    error_log  logs/main-error.log; 
- 
-    location / { 
-        try_files $uri $uri/ /index.php?$query_string; 
-    } 
- 
-    location ~* /(\.git|cache|bin|logs|backup|tests)/.*$ { return 403; } 
-    location ~* /(system|vendor)/.*\.(txt|xml|md|html|htm|shtml|shtm|json|yaml|yml|php|php2|php3|php4|php5|phar|phtml|pl|py|cgi|twig|sh|bat)$ { return 403; } 
-    location ~* /user/.*\.(txt|md|json|yaml|yml|php|php2|php3|php4|php5|phar|phtml|pl|py|cgi|twig|sh|bat)$ { return 403; } 
-    location ~ /(LICENSE\.txt|composer\.lock|composer\.json|nginx\.conf|web\.config|htaccess\.txt|\.htaccess) { return 403; } 
- 
-}</code> 
- 
-  "%UserProfile%\Desktop\nginx Reload.bat" 
- 
-====== Initial Setup ====== 
- 
-  * https://realmofespionage.xyz 
-  * :!: If Joomla gives a 500 error, it's likely the ''sessions'' folder not having the right permissions, see [[servers:nginx_php_php-fpm#permissions]] 
- 
-====== Settings ====== 
- 
-===== Purity III Template ===== 
- 
-  * [[https://www.joomlart.com/joomla/templates/purity-iii|Purity III]] 
- 
-==== Install ==== 
- 
-  * [[https://www.joomlart.com/member/downloads/joomlart/free-templates/purity-iii|Downloads]] 
-  * Install T3 Framework and Purity III from that downloads page 
- 
-==== System Dashboard ==== 
- 
-  * Templates -> Site Template Styles 
-  * Set ''purity_III - Default'' to Default 
- 
-==== Theme Settings ==== 
- 
-  * General -> Show T3 Logo: Off 
- 
-  * Theme -> Logo Type: Text 
-  * Theme -> Site Name: ''Realm of Espionage'' 
- 
-  * Navigation -> Megamenu Configuration -> Animation: Fading 
-  * Navigation -> Megamenu Configuration -> Duration: ''300'' 
- 
-  * Add-ons -> Off-canvas Sidebar -> Enable: Off 
- 
-  * Assignment -> Toggle Selection 
- 
-==== Footer ==== 
- 
-=== Copyright === 
- 
-  * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 
- 
-== Logo == 
- 
-**** 
- 
-  wget -O '/tmp/cc-by-sa-40.png' 'https://licensebuttons.net/l/by-sa/4.0/80x15.png' && sudo mv '/tmp/cc-by-sa-40.png' '/var/www/main/images/cc-by-sa-40.png' && sudo chown 'nginx':'nginx' '/var/www/main/images/cc-by-sa-40.png' && sudo restorecon -F -I -R '/var/www/main/images/cc-by-sa-40.png' && sync 
- 
-== Text == 
- 
-  * Place text within the ''<section class="t3-copyright">'' section underneath the ''Bootstrap by Twitter'' and ''Font Awesome'' mentions 
-  * Remove ''Bootstrap by Twitter'' and ''Font Awesome'' mentions 
- 
-  sudo -e '/var/www/main/templates/purity_iii/tpls/blocks/footer.php' && sudo chown 'nginx':'nginx' '/var/www/main/templates/purity_iii/tpls/blocks/footer.php' 
- 
-<code> 
-          <small> 
-            <img src="https://realmofespionage.xyz/images/cc-by-sa-40.png" width="80" height="15" /> All content and data available on Realm of Espionage is available under the <a href="https://creativecommons.org/licenses/by-sa/4.0" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International</a> license. 
-          </small></code> 
- 
-==== Custom CSS ==== 
- 
-  * :!: This shrinks the footer height, and places it back at the bottom of the screen instead of floating half-way up the page when little content exists ([[https://www.joomlart.com/forums/topic/footer-on-bottom-of-screen-not-sticky/#post-898349|source 1]], [[https://www.joomlart.com/documentation/joomla-faqs/css-related-issues#footer-sticky|source 2]]) 
-  * Also replaces ThemeMagic for Brand Primary Color, Footer Background, and Footer Text Color 
- 
-  * Last tested: 2024/02/01 on Joomla 5.1.0-dev, T3 Framework 3.2.0, and Purity III 2.1.0 
- 
-  sudo -e '/var/www/main/templates/purity_iii/css/custom.css' && sudo chown 'nginx':'nginx' '/var/www/main/templates/purity_iii/css/custom.css' 
- 
-<code> 
-html, 
- 
-body { 
-  height: 100%; 
-} 
- 
-a { 
-  color: #3D8BFF; 
-} 
- 
-a:hover { 
-  color: #196BE4; 
-} 
- 
-.t3-mainnav { 
-  background-color: #3D8BFF; 
-} 
- 
-.logo a { 
-  background: none; 
-} 
- 
-.logo a:hover { 
-  background: #196BE4; 
-} 
- 
-.t3-wrapper { 
-  position: relative; 
-  min-height: 100%; 
-} 
- 
-.t3-footer { 
-  position: absolute; 
-  bottom: 0; 
-  left: 0; 
-  right: 0; 
-  background-color: #484848; 
-  color: #FFFFFF; 
-} 
- 
-.t3-copyright { 
-  padding-top: 20px; 
-  padding-bottom: 0px; 
-}</code> 
- 
-===== Articles ===== 
- 
-==== Home ==== 
- 
-  * The line-breaks are intentional and are there to make how it displays look nicer 
-  * Add links to ''RoE | Wiki'' and ''CC BY-SA 4.0 license'' 
- 
-<code>  
-  
- 
-Welcome! Realm of Espionage is a personal project composed of various services. All services on RoE are free and open-source, self-hosted, and configured with strict security in-mind. My most prominent project currently is RoE | Wiki, a DokuWiki instance that holds my notes on all sorts of operating system, client, and server deployments, free for anyone to view and redistribute under the CC BY-SA 4.0 license. 
- 
-  
- 
-This domain serves as a landing page and provides links to my most-used profiles and projects. To view them, use the navigation bar (desktop) or the ≡ hamburger icon (mobile) at the top of the screen. 
- 
- </code> 
- 
-===== Menus ===== 
- 
-  * Main menu headers are: System Links -> URL -> ''#'' to allow tapping as-expected on mobile 
-  * Icon sizes are 24x24 
-  * Menu entries should be named normally before saving for a proper ''alias'', and then add a space on the title afterwards to make it look better with the icon 
- 
-===== Global Configuration ===== 
- 
-==== Site Meta Description ==== 
- 
-**** 
- 
-  Realm of Espionage is a personal project composed of various self-hosted services. All services are hosted in-house under secure conditions, and notes are provided for all services under the CC-BY-SA 4.0 license. 
- 
-==== Content Rights ==== 
- 
-**** 
- 
-  Creative Commons Attribution-ShareAlike 4.0 International 
- 
-==== Articles ==== 
- 
-  * System -> Global Configuration -> Articles 
- 
-  * Show Title: Hide 
-  * Show Category: Hide 
-  * Show Author: Hide 
-  * Show Publish Date: Hide 
-  * Show Navigation: Hide 
-  * Show Print: Hide 
-  * Show Email: Hide 
-  * Show Hits: Hide 
- 
-==== Menu ==== 
- 
-  * Menus -> Main Menu -> Home -> Link Type -> Display in Menu: No 
-  * Menus -> Main Menu -> Home -> Page Display -> Show Page Heading: Hide 
- 
-====== Batch Files ====== 
- 
-===== PHP-CGI ===== 
- 
-  notepad++ "%UserProfile%\Desktop\Main php-cgi.bat" 
- 
-<code> 
-CD "C:\php-"*"-nts-Win32-vs16-x64\" 
- 
-SET PHP_FCGI_MAX_REQUESTS="0" 
-SET PHP_FCGI_CHILDREN="1" 
- 
-START "Main PHP-CGI" php-cgi.exe -b "127.0.0.1:9001" -c "%SystemDrive%\www\php\main-php.ini" 
- 
-:: End</code> 
- 
-  "%UserProfile%\Desktop\Main php-cgi.bat" 
  
C:/www/wiki/data/attic/windows/servers/nginx/grav.1719613334.txt.gz · Last modified: by Sean Rhone