Allow Remote Desktop for Administration on Windows Server 2008 R2

https://technet.microsoft.com/en-us/library/cc742816(v=ws.11).aspx

Using Remote Desktop

Applies To: Windows Server 2008 R2

To allow remote connections for administrative purposes only, you do not have to install the RD Session Host role service. Instead, you enable Remote Desktop on the computer that you want to remotely administer.

noteNote
Remote Desktop supports only two concurrent remote connections to the computer. You do not need Remote Desktop Services client access licenses (RDS CALs) for these connections.

You can use the following procedure to enable Remote Desktop on a Windows Server 2008 R2 computer.

Membership in the local Administrators group, or equivalent, on the computer that you plan to configure, is the minimum required to complete this procedure.

To enable Remote Desktop

  1. Start the System tool. To start the System tool, click Start, click Run, type control system and then click OK.
  2. Under Tasks, click Remote settings.
  3. In the System Properties dialog box, on the Remote tab, click either of the following, depending on your environment:
    • Allow connections from computers running any version of Remote Desktop (less secure)
    • Allow connections only from computers running Remote Desktop with Network Level Authentication (more secure)

    For more information about the two options, click the Help me choose link on the Remote tab.

  4. Click Select Users to add the users and groups that need to connect to the computer by using Remote Desktop. The users and groups that you add are added to the Remote Desktop Users group.
    noteNote
    Members of the local Administrators group can connect even if they are not listed.

 

Install Apache, PHP and MySQL on Windows Server 2008 R2 SP1

 Apache doesn’t provide binaries for Windows, however Apache provides links to several third-party sites that do provide binaries, for example, Apache Lounge. From the Apache Lounge website, and depending on your Windows Server version (32bir-x86 or 64bit-x64 ) we can download either the 32-Bit version (win32) or the 64-Bit one (Win64)

Download the Prerequisites – Example: 64bit versions:

Go to Apache Lounge: Apache2.4.25-win64-VC14
The File Download: (httpd-2.4.25-win64-VC14.zip)

Go to windows.php.net/download:  PHP-7.1-VC14-x64-Thread-Safe
The File Download: (php-7.1.5-Win32-VC14-x64.zip)

Find this at Microsoft:
C++RedistributableVisualStudio2015 (vc_redist.x64.exe)

Installation Instructions for Apache:

First Install the C++ Redistributable Visual Studio 2015.  It will show up in your Programs and Features in the Control Panel.  Using the PHP-7.15 VC14 x64 thread safe and the Apache2.4.25-Win64=VC14, you should also use the C++ VS2015 x64 redistributable (rather than VS2017 version).  Make everything match or you will have errors when you try to start Apache after you

Unzip the Apache2.4.25 VC14 and then copy the extracted contents to a new folder c:/Apache24 (that is the ServerRoot in the config).
Default folder for your your web pages is DocumentRoot “c:/Apache24/htdocs”

Note: If  you unzip to a location other than C:\Apache24, you will need to change ServerRoot in the httpd.conf, and also change in httpd.conf the Documenroot, Directories, ScriptAlias, also when you use the extra folder config file(s) change to your location there.

We may need to set up a fully qualified domain name at this point.

Starting Apache in a DOS box as Administrator.  In other words, ppen a command prompt “As Administrator.”

Change the directory as follow:
cd\apache24\bin

C:\apache24\bin> httpd.exe

At this point, It may appear to you that the system is hanging, but it is NOT hanging.  In fact, it means there are no errors, at least those that are reported at the moment, and that Apache is probably started and running.  Test Apache by opening a web browser and typing localhost in the address bar. Hit enter.  “IT WORKS!”

To “Break” from the “Hang” in the DOS command prompt:
C:\apache24\bin> Ctrl+C

After you install PHP7, then come back here and
Install Apache as a service:

C:\apache24\bin> httpd.exe -k install

Installation Instructions for Installing PHP7.1.5:

Using Windows Explorer (file explorer), create a new folder named php at the Windows C: drive root:

c:\php

Now, extract all the folders and files from php-7.1.5-Win32-VC14-x64.zip.

Then copy those extracted folders and file contents to the new folder:
C:\php

Now, go get and install Notepad++ if you have not already installed it.  This text editor (or one like it) is a must to open and edit various text configuration files for php and apache, etc.

Here is the download page for Notepad++:  https://notepad-plus-plus.org/download/v7.4.1.html  Get the 64-bit or 32-bit version of Notepad++ that your system requires:

But, here is the installer file for the 64-bit version of Notepad++

Within the php root c:\php, open the php.ini.production file and save it as a file named php.ini in the root folder c:\php

Using Windows Explorer (file explorer) find the file called php.ini.production.  Open it using Notepad++ editor.  Now, on the Notpad++ menu, click File, select SAVE AS and change the name of the file to php.ini before saving it. 

APPEND the following items to the existing items within the “PATH” System Environment Variable. Note a Semicolon ; must separate each path item.  If you don’t know how to do this, you must learn.

;c:\php;c:\apache24;c:\apache24\bin

Go to a Dos command prompt and type in:

path (press enter)

You will see a display of what is in the current path. At this point, the above-appended path items are not yet included in the current path.

Log Off Windows, then Ctrl-Alt-Del and log into Windows again.

Now, open a command prompt and type:

path (press enter)

You will see the existing path containing the above-appended path items. 

Integrate / Connect Apache2 to your PHP7:

Using Windows Explorer, go to c:\apache24\conf

Open with Notepad++ the file called httpd.conf
Scroll down within the httpd.conf file and just below all the “LoadModule” lines, insert the following new lines:

LoadModule php7_module C:/PHP/php7apache2_4.dll

<IfModule php7_module>
DirectoryIndex index.html index.php
AddHandler application/x-httpd-php .php
PHPIniDir “C:/PHP”
</IfModule>

Save the changes to httpd.conf file and then close Notepad++

Log off Windows, and log into Windows again.

Test Apache now having php referenced from the httpd.conf of Apache.  How, just like we did above.

Start Apache in a DOS box as Administrator.  In other words, open a command prompt “As Administrator.”

Change the directory as follow:
cd\apache24\bin

and type httpd.exe at the prompt (and press enter).

C:\apache24\bin> httpd.exe

If it “hangs” without errors, you are good!  Open a browser and input localhost in the address bar.  IT WORK! 

In the command prompt window, enter Ctrl+C in order to break to the C:\> prompt.

In Windows, click Start, point at Administrative Tools, and select Services.  Then, in the Services list, find the Apache service near the beginning of the list, right-click the Apache service and left click /or select Properties. Find the correct TAB to STOP the Apache service.

Remember that I said above, after you install PHP7, then come back here and

Install Apache as a service:

C:\apache24\bin> httpd.exe -k install

Test localhost in your Web Browser.  IT WORKS!

Displaying PHP INFO:

Open Notepad++ text editor and create a new file (on the menu, click file, new).  Now, save the new with a filename of phpinfo.php

While you still have the new “phpinfo.php” file displayed within Notepad++, now insert the following contents on line 1 of the new file.

<?php phpinfo() ; ?>

Save the file named phpinfo.php with only this one line of content.  Copy or save this file to the root folder of the Apache http docs. In other words, save or copy the new phpinfo.php file into the following target sub-folder.

c:\apache24\htdocs\

Open a web browser, type into the address bar:

localhost/phpinfo.php

Voila!!!

Open TCP Port 80 In Windows Firewall

https://wiki.mcneel.com/zoo/window7firewall

Open TCP Port 443 in Windows Firewall the same way.

Configure httdd.conf using Notepad++

Find httpd.conf in C:\apache24\conf\
#ServerName www.example.com
#Insert next line & change svr (host header domain com or net)
ServerName svr.yourdomain.tld

Restart Apache service in the Services Module
Start, Administrative Tools, Services.

Set Up a DNS Entry — “A” (Address) record, pointing to your server’s fully qualified domain name and the IP address

You should now be able to connect from a remote 

 = = = = = = To be continued = = = =

ApacheMonitor:

Double click ApacheMonitor.exe, or put it in your Startup folder.

How to Identify and Stop and Remove a Docker Container

This pertains to Ubuntu Server 16.04 running Apache2.x, PHP7.x, and MySQL.  NextCloud 12 is installed and running on a domain with an SSL certificate issued by a public CA (on www.mydomain.tld and mydomain.tld).  I tried to integrate Collabora (Docker) obtaining its own SSL on a subdomain (office.mydomain.tld)

It became necessary to remove and reinstall the Collabora docker container / image. My two SSL certificates were conflicting after Collabora was installed and enabled in NextCloud 12. There was a failed configuration when I following the guided instructions for integrating Collabora online with NextCloud.  Incidentally, the installation mistake occurred  during the “run” phase. I mistakenly (and understandably) entered the sub-domain “office.mydomain.tld” (i.e. the subdomain where my collabora SSL certificate will address) rather than entering the already configured nextcloud domain www.mydomain.tld.  See the correct run command at the end of this Article.

Open terminal or putty ssh connection:

To See All docker containers:
sudo docker ps -a

To Stop a running docker container:
sudo docker stop <container id>
Example:
sudo docker stop 94fc7ad48626

Check the status again:
sudo docker ps -a

To Remove a stopped docker container:
sudo docker rm <container id>
Example:
sudo docker rm 94fc7ad48626

If there is an error at the removal step, it may be necessary to either restart apache or reboot the system.  Restarting Apache did not work for me.  I rebooted the system.

After reboot, check the status again and the container ID should be gone/empty. CONGRATULATIONS.  

When you reinstall Collabora:

Example to run the docker container referencing correct sub-domain of the previously installed nextcloud:
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e ‘domain=nextcloud\\.your-domain\\.com’ –restart always –cap-add MKNOD collabora/code

I am not sure whether I should again first pull the docker Collabora/code before the docker run.  I will let you know.

 

Footnotes:  URL References / Credits:

https://docs.docker.com/engine/reference/commandline/stop/

https://help.nextcloud.com/t/collabora-docker-remove/4851

Prerequisites For Installing CMS Made Simple Version 2.1.6

Readme File for CMS Made Simple (PDF)

Requirements:

  1. The installation assistant requires a PHP environment with a minimum version of PHP 5.4.0.
  2. For new installations of CMS Made Simple you should create a new mysql database and database user. The database user
  3. must have ALL PRIVILEGES to all tables within the new database.
  4. CMS Made Simple itself requires at least PHP 5.4.11 with numerous libraries enabled (the install assistant will
    check for these) including json, tokenizer, xml, and gd.
  5. Your PHP environment must include the PHAR extension (yes, even for the expanded installer). This is for expanding the archive(s) included within the installation assistant.

Remove ‘Powered By’ in Footer of Septera Theme by CryoutCreations

If you make this edit, please understand that you should either pay Cryout Creations $25 for support (and CC’s removal of their part of this “Powered By WordPress” footer segment), or please insert authoring credit for Cryout Creations elsewhere on your website for their development of this Septera theme.

First, on you website, locate the core.php file in the path wp-content/themes/septera/includes/

Next, create a backup of the original core.php file by copying this file to a location outside your website.  Then, come back and make your changes to the core.php file that is live online from your website. Understand that If you do not self-host your website on you own server, thus having direct access to the server file system and this core.php file, then you will likely need to access it via ftp to make a backup, perform the edit, and overwrite the original online file with your edited file.

You can edit the core.php file using a good text editor, such as the Notepad++ editor.  In core.php first locate the Footer Hook section from lines 235 to 248.  Insert //Rem at the beginning of those certain 4 lines (to disable them) as shown below:

/**
* Footer Hook
*/
add_action( ‘cryout_master_footer_hook’, ‘septera_master_footer’ );
function septera_master_footer() {
$septera_theme = wp_get_theme();
do_action( ‘cryout_footer_hook’ );
echo ‘<div id=”footer-separator”></div>’;
echo ‘<div id=”site-copyright”>’ . wp_kses_post( cryout_get_option( ‘septera_copyright’ ) ) . ‘</div>’;
//REM echo ‘<div style=”display:block;float:right;clear: right;font-size: .85em;font-weight: bold; text-transform: uppercase;”>’ . __( “Powered by”, “septera” ) .
//REM ‘<a target=”_blank” href=”‘ . esc_html( $septera_theme->get( ‘ThemeURI’ ) ) . ‘” title=”‘;
//REM echo ‘Septera WordPress Theme by ‘ . ‘Cryout Creations”> ‘ . ‘Septera’ .'</a> &amp; <a target=”_blank” href=”‘ . “http://wordpress.org/”;
//REM echo ‘” title=”‘ . __( “Semantic Personal Publishing Platform”, “septera”) . ‘”> ‘ . sprintf( ” %s.”, “WordPress” ) . ‘</a></div>’;
}

Click to expand the following screen capture image to see what this section looks like from within the Notepad++ editor.

footer hook in core.php

I tried using a child theme to make this change, but I was having some problems making it work.  This may have something to do with the priority of functions loading (i.e. the order in which functions are loading) between the child and parent themes. I changed some priorities in the add_actions and do_action of the child theme, but to no avail.  Let me know if you figure it out.  Send comments.  sheldon @ sheldonsblog.com.

Alternative way to make the same change.   You could also edit the core.php theme file from within the WordPress administrative dashboard.  On the dashboard menu, point at “Appearance” and select “Editor.”  Scroll down the file list on the right side of the editor page and select “core.php.”  //REM out the same 4 lines in the footer hook section as shown in the following screen image.  And click the update save button to save your changes.

Download Order of US District Court for Hawaii Granting TRO

Download the Order Granting Motion for Temporary Restraining Order against the enforcement of Sections 2 and 6 of President Trump’s Second Executive Order (Replacement Order) #13,769, entitled “Protecting the Nation from Foreign Terrorist Entry into the United States.”

IN THE UNITED STATES DISTRICT COURT FOR THE DISTRICT OF HAWAI‘I

STATE OF HAWAI‘I and ISMAIL
ELSHIKH,
Plaintiffs,
vs.
DONALD J. TRUMP, et al.,
Defendants.

CV. NO. 17-00050 DKW-KSC

ORDER GRANTING MOTION FOR TEMPORARY RESTRAINING ORDER

March 15, 2017

Click Here to Download the Order