Categories
General Server Configuration Ubuntu

Cannot add PPA: ppa:yannubuntu/boot-repair

Cannot add PPA: ‘ppa:yannubuntu/boot-repair’

Often, when trying to reapair Windows MBR or even modify the boot order on a Ubuntu and Windows dual boot system, it is recommended to use the package “boot-repair”.

the first step in this process is adding the repository: sudo add-apt-repository ppa:yannubuntu/boot-repair

However, many people end up getting an error stating that the repository doesn’t exist: “”

Cannot add PPA: 'ppa:~yannubuntu/ubuntu/boot-repair'.
ERROR: '~yannubuntu' user or team does not exist.

How can you repair Grub if yannubuntu doesn’t exist?

Because this operation is generally recommended to be done on a live USB or disk version of the OS it is very common to forget to connect to the wifi.

If you are experiencing ” ~yannubuntu’ user or team does not exist. ” or “Cannot add PPA: ppa:yannubuntu/boot-repair”, I suggest you make sure you are on the internet first!

Categories
Server Configuration Wordpress

405 method not allowed – IIS and Gutenberg

Some servers are not configured to allow all of the functionality for Gutenberg, the new WordPress editor. When saving, the PUT operation might be disallowed, giving you an error like: “405 method not allowed”. If you have access to your web.config file you can fix this problem with a minor change.

Change:

<add name="php-7.0.11" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files\PHP Manager 1.2 for IIS 7\PHP-Versions\php-7.0.11-nts-Win32-VC14-x86\php-cgi.exe" resourceType="Either" requireAccess="Script" />

To:

<add name="php-7.0.11" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\Program Files\PHP Manager 1.2 for IIS 7\PHP-Versions\php-7.0.11-nts-Win32-VC14-x86\php-cgi.exe" resourceType="Either" requireAccess="Script" />

Or, just add the “PUT”:

<add name="php-7.0.11" path="*.php" verb="GET,HEAD,POST,PUT,OPTIONS" modules="FastCgiModule" scriptProcessor="C:\Program Files\PHP Manager 1.2 for IIS 7\PHP-Versions\php-7.0.11-nts-Win32-VC14-x86\php-cgi.exe" resourceType="Either" requireAccess="Script" />

For more information about IIS and the “405 method not allowed error”, you can check out the official website at https://www.iis.net/

Edit: Updated January 27, 2019 to reflect that sometimes “OPTIONS” is required as well.

Categories
General Server Configuration

Enabling SSL Over TLS For Filezilla Server

In order to encrypt communications via FTP, which is obviously more secure,  you should connect to a server using FTP over TLS. When you are using Filezilla Server this process is quite easy and can be completed in under 5 minutes.

The certificate in the following steps will generate warnings as it isn’t issued by a trusted authority, but for the sake of simply connecting to an endpoint that you already trust and making sure your transfers are secure, this is the way to go:

See: https://wiki.filezilla-project.org/FTP_over_TLS

Categories
General Server Configuration Site Optimization

Leverage Browser Caching in IIS Web.config

Google’s Page Speed test recommends the we leverage browser caching. To do this in Windows using IIS, open the site’s web.config and add a client caching directive:

<system.webServer>
<staticContent>
<clientCache cacheControlMode=”UseMaxAge” cacheControlMaxAge=”365.00:00:00″/>
</staticContent>
</system.webServer>

**There are “per file” rules that can be applied but this seems to be sufficient for Google

Categories
General Server Configuration Wordpress

Invalid Request OpenSSL Error: Adding a new site to MainWP on Windows

I have been setting up MainWP on Windows and I ran into an issue when trying to add my first site. MainWP’s dashboard gave me an error, “Invalid Request” – not very descriptive. When I looked in my PHP error log I found: “[10-Dec-2016 14:20:34 UTC] PHP Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in [PATH_TO_SITE]\wp-content\plugins\mainwp\view\view-mainwp-manage-sites-view.php on line 1737
” .

 

A bit of Googling told me that MainWP looks for OpenSSL, and if it doesn’t exist it falls back on an MD5 encryption scheme. If OpenSSL exists, but isn’t configured properly the process just fails there.

 

After some poking around I found that my OpenSSL installation was throwing  and error regarding “/usr/syno/ssl/openssl.cnf” not exisiting. After reading this post I created this folder structure and the file and “voila” OpenSSL ran without the error and I could add my sites! The actual full path was: C:\usr\syno\ssl\openssl.cnf