Monday, 08 April 2019 00:24

System Requirements and Software Dependencies

Written by
Rate this item
(0 votes)

First of all - thank you for visiting my blog and reading my posts. Midnight12.com seems to be running without big hickups and visitors are finding their way to the site, either by SE, feeders or with this blog. The system contains 3 factors, the server , the software and the website system. Here's a list of the server (also called hardware):

  • SP-32 Server - Intel Xeon E3-1270v6 - 32GB DDR4 ECC 2400 MHz - SoftRaid 2x2TB - at OVH.
  • Debian 8 prefered as Operative System.
  • /var partition setup to RAID0 (remember to create backup and download it reguarly for your website, setting for each virtualhost in ISPConfig3).
  • 8 extra IP adresses (DNS managed by domainseller, 1 IP for E-Mail, 8 IP for Website (9 IP in total).

This setup can be bought at a cheap price starting at around 60 euro monthly at my favorite hosting company OVH.
The server goes with 1Gbps upload (not capped) and 500Mbps download speed. It's including 6TB bandwidth (upload & download combined) per month - if you need extra traffic there are packages you can purchase (contact support).

To setup all this together takes time. Grab a cup of coffee, tea or chocolate first and then start with setting up the system... Click Read more to get details about how to setup the first steps of the system.

As to the software for building the website you will need.

  1. 'ISPConfig3.0.5.4'
    To handle the Domain, SSL, Backup, IP, E-Mail and Webspace setup.


  2. 'Apache 2.4.10'/Debian webserver.


  3. 'PHP 7.2'
    Configured as Apache Module for PHP scripts.


  4. 'MySQL Database'
    With UTF8MB4 charset support.


  5. 'SSL'
    To encrypt website traffic against various hacker attacks.


  6. 'SSL certificate DV'
    Let's Encrypt certificates are available within the ISPConfig3 interface - Free "Let´s Encrypt" certificates expires after 3 months.

Components required to make encoding of videos possible.

apt-get install libavcodec56 libavcodec57

  • 'gpac' encoder pack (MP4Client & MP4Box).

apt-get install gpac

  • 'ffmpeg' to encode videos (/usr/bin/ffmpeg or /usr/local/bin/ffmpeg).

apt-get install ffmpeg

  • 'yamdi' or else 'flvtool2' to read media metadata (/usr/bin/yamdi or /usr/bin/flvtool2).

apt-get install yamdi

Software components required for the website itself.

  • 'PHP 7.2' for PHP scripts and apps running the website (7.2, because 7.1 has security issues with phpMyAdmin).

apt-get install php7.2

a2enmod php7.2

update alternatives --set php /usr/bin/php7.2

Download from: https://downloads.joomla.org/cms/joomla3/3-9-5/Joomla_3-9-5-Stable-Full_Package.zip?format=zip
Upload to your 'web' directory for your domain via FTP manager like Filezilla.
Connect via SSH and type the following cli command in your "/var/www/<yourdomain.com>/web" directory:
unzip Joomla_3-9-5-Stable-Full_Package.zip

Purchase & Download from: https://www.jomsocial.com/
Install via Extension Manager (Install) in Joomla 3.x

  • 'HWDMediaShare', latest build for Joomla 3.x including Premium Addons.

Purchase & Download from: https://hwdmediashare.co.uk
Install via Extension Manager (Install) in Joomla 3.x

  • 'Jumi', latest build for 3.x - to execute scripts (PHP, geoip iframe banners, javascript) in modules.

Download from: http://2glux.com/projects/jumi
Install via Extension Manager (Install) in Joomla 3.x

  • 'MaxiMenuCK', latest build for Joomla 3.x - for a good looking and responsive/mobile-friendly menu.

Download from: https://www.joomlack.fr/en/joomla-extensions/maximenu-ck
Install via Extension Manager (Install) in Joomla 3.x

Switch to 'protostar' or your own template folder in Joomla Template Manager within the administration panel.
  • 'sh404SEF' Joomla SEF Paid Component (SEO).

Since of it's technical nature and not very user-friendly navigation it's only per need basis. 
Only install if you find it necessary to have all pro functions available.

Apache modules that needs to be enabled to make it all possible.

  • Apache Module expires (leverage browser cache)

a2enmmod expires

Sample entry in .htaccess to activate the expires module.

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 days"
</IfModule>
## EXPIRES CACHING ##

Sample entry in .htaccess for your "/var/www/<yourdomain.com>/web" (webroot) directory (if you are in the adult business and want to prevent kids from entering your website by reporting site adult rated for family care software!).

  • Apache Module headers (RTA Label to prevent kids from entering and Cache interventions).

a2enmmod headers

<IfModule mod_headers.c>
Header set Rating "RTA-5042-1996-1400-1577-RTA"
</IfModule>

Default Joomla 3.x .htaccess entry.

  • Apache Module rewrite (clean SEO URLs).

a2enmmod rewrite

##
# @package Joomla
# @copyright Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of mod_rewrite, but it may have already been set by your
# server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##

## No directory listings
<IfModule autoindex>
IndexIgnore *
</IfModule>

## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# RewriteBase /

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

Default web.config.txt file for Joomla 3.9.x

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path=".">
<system.webServer>
<directoryBrowse enabled="false" />
<rewrite>
<rules>
<rule name="Joomla! Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="base64_encode[^(]*\([^)]*\)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="(&gt;|%3C)([^s]*s)+cript.*(&lt;|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
</conditions>
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="Joomla! Rule 2">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{URL}" pattern="^/index.php" ignoreCase="true" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
<httpProtocol>
<customHeaders>
<add name="X-Content-Type-Options" value="nosniff" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
</configuration>

Default WordPress 5.2 .htaccess entry.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Default Adepca .htaccess Works for Joomla and Wordpress at the same time.

## DEFLATE GZIP SETTINGS ##
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
## DEFLATE GZIP SETTINGS ##

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 days"
</IfModule>
## EXPIRES CACHING ##

## No directory listings
<IfModule autoindex>
IndexIgnore *
</IfModule>

## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

#Remove if site produces 403 or 500 error
Options +FollowSymlinks
Options -Indexes
#Remove End

## Mod_rewrite in use.
RewriteEngine On

# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Enable Wordpress rewrite in nginx (SEF URLs), Upload Limit 5000MB, enable gzip compression

location / {
rewrite ^(.*)/$ /index.php?$args last;
}
client_max_body_size 5000M;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_vary on;
gzip_types text/plain text/css text/javascript image/svg+xml image/x-icon application/javascript application/x-javascript;
  • Apache Module spelling (catch mistypes in URLs and redirect to similar looking alias)

a2enmmod spelling

If you for some reason need to disable a module the command is the following (works for any active module):

a2dismod <modulename>

 

Working sample here (porn related website 18+ Only!)

 

//SEO is almost supernatural

Read 1937 times Last modified on Sunday, 25 August 2019 21:49

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

6 comments

  • Comment Link http://canadianorderpharmacy.com/ Wednesday, 05 June 2019 04:30 posted by http://canadianorderpharmacy.com/

    hi!,I really like your writing so much! proportion we keep in touch more approximately your article on AOL? I need a specialist on this house to unravel my problem. May be that is you! Having a look forward to peer you.

    Report
  • Comment Link rardaidek Sunday, 01 September 2019 05:27 posted by rardaidek

    Hello. And Bye.

    Report
  • Comment Link free v bucks season 9 generator Monday, 09 September 2019 18:37 posted by free v bucks season 9 generator

    I am so happy to read this. This is the kind of manual that needs to be given and not the random misinformation that's at the other blogs. Appreciate your sharing this greatest doc.

    Report
  • Comment Link Kandice Paiva Thursday, 12 September 2019 23:57 posted by Kandice Paiva

    I simply couldn't depart your web site before suggesting that I actually loved the standard info a person provide in your visitors? Is gonna be again continuously to investigate cross-check new posts

    Report
  • Comment Link rardaidek Friday, 13 September 2019 21:56 posted by rardaidek

    Hello. And Bye.

    Report
  • Comment Link Angeles Ofsak Saturday, 21 September 2019 16:34 posted by Angeles Ofsak

    Hello there, You've done a great job. I will definitely digg it and in my opinion recommend to my friends. I'm confident they'll be benefited from this site.|

    Report