This is a way to install and set up Nginx, MariaDB and PHP 8.1 (mode PHP-FPM), Certbot on Ubuntu 20.04.
$ sudo apt update
$ sudo apt install nginx -y
| <?php | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| # | |
| # Check version php and pecl | |
| # | |
| php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php | |
| pecl version | |
| # | |
| # Install mcrypt extension | |
| # see http://pecl.php.net/package-info.php?package=mcrypt&version=1.0.1 | |
| # |
| server { | |
| listen 80; | |
| server_name cdn.domain.org; | |
| root /usr/share/nginx/cdn | |
| location / { | |
| proxy_pass http://domain.org; | |
| proxy_set_header Host $host; | |
| proxy_set_header True-Client-IP $remote_addr; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| .popup { | |
| position: fixed; | |
| top: 50vh; | |
| left: 50%; | |
| width:400px; | |
| margin-left: -200px; |
| <script type="application/ld+json"> | |
| { "@context": "https://schema.org", | |
| "@type": "Organization", | |
| "name": "Elite Strategies", | |
| "legalName" : "Elite Strategies Llc", | |
| "url": "http://www.elite-strategies.com", | |
| "logo": "http://cdn.elite-strategies.com/wp-content/uploads/2013/04/elitestrategies.png", | |
| "foundingDate": "2009", | |
| "founders": [ | |
| { |
| #!/bin/bash | |
| # @author: Seb Dangerfield | |
| # http://www.sebdangerfield.me.uk/?p=513 | |
| # Created: 11/08/2011 | |
| # Modified: 07/01/2012 | |
| # Modified: 17/05/2012 | |
| # Modify the following to match your system | |
| NGINX_CONFIG='/etc/nginx/sites-available' | |
| NGINX_SITES_ENABLED='/etc/nginx/sites-enabled' |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |