• Hosting,  Linux

    Rewrite rule – Force HTTPS / Linux

    Forcing HTTPS is very easy to do in Apache. The common command is to force everything to HTTPS. In your host file, under :80 make sure you have the following. At the same time, make sure you have :443 open and that your configuration is ready to host the new traffic. #Force HTTPS RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] To check if your apache config is working properly, you can run: apachectl configtest

  • Hosting,  Support,  Windows,  Windows 7

    Script for Chrome cache multiple users

    I found a script this very useful script. It does a good job of cleaning the Chrome cache in user profiles on a terminal server. Original Post: https://community.spiceworks.com/topic/1425012-clear-chrome-cache-for-multiple-users-on-file-server Thanks! ======== @ECHO On TASKKILL /F /IM Chrome.exe /T for /f %%a in (‘dir c:\users /b’) do ( rd “c:\users\%%a\AppData\Local\Google\Chrome\User Data\Default\Cache” /s /q del “c:\users\%%a\AppData\Local\Google\Chrome\User Data\Default\*history*.*” /s /q del “c:\users\%%a\AppData\Local\Google\Chrome\User Data\Default\*History Provider Cache*.*” /s /q del “c:\users\%%a\AppData\Local\Google\Chrome\User Data\Default\*cookies*.*” /s /q ) exit /b 0

  • Info,  Windows

    Script for disk cleanup

    @echo off REM Install Disk Cleanup based on Windows Version ver | findstr /i “6\.0\.” > nul IF %ERRORLEVEL% EQU 0 goto ver_2008 ver | findstr /i “6\.1\.” > nul IF %ERRORLEVEL% EQU 0 goto ver_2008R2 goto warn_and_exit :ver_2008 :Run Windows 2008 specific commands here echo OS Version: Windows 2008 IF NOT EXIST “%SYSTEMDRIVE%\Program Files (x86)” goto ver_2008_x86 echo 64-bit copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_c962d1e515e94269\cleanmgr.exe C:\Windows\System32\ copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_b9f50b71510436f2\cleanmgr.exe.mui C:\Windows\System32\en-US\ cleanmgr.exe goto end :ver_2008_x86 echo 32-bit copy C:\Windows\winsxs\x86_microsoft-windows-cleanmgr_31bf3856ad364e35_6.0.6001.18000_none_6d4436615d8bd133\cleanmgr.exe C:\Windows\System32\ copy C:\Windows\winsxs\x86_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.0.6001.18000_en-us_5dd66fed98a6c5bc\cleanmgr.exe.mui C:\Windows\System32\en-US\ cleanmgr.exe goto end :ver_2008R2 :Run Windows 2008R2 specific commands here echo OS Version: Windows 2008 R2 copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe C:\Windows\System32\ copy C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui C:\Windows\System32\en-US\ cleanmgr.exe goto end :warn_and_exit echo Machine OS cannot be determined.…

  • Hosting,  Windows

    Virtual Servers/Workstations not showing up in WSUS

    Issue:  Virtual servers/workstations deployed from the same image do not show up in WSUS.  You notice that in WSUS groups that the machine listing rotates machine names everytime you refresh, but never lists them separately. Cause:  This is caused by having the same SSID when deployed.  When sysprep is not run to prepare the image, then the machine may exhibit this behavior.  Please note:  This behavior is not consistent, but for the ones that are missing, you need to do some tweaking to get this working. Resolution:   After your GPO is applied correctly, stop the Windows Update service.  Command prompt –> net stop wuauserv Delete the following registry keys:…

  • Hosting,  Windows

    Rewrite Rule – Force https

    Issue:  You have a particular domain on a Windows server that you want to force the URL to rewrite to the SSL certificate that is installed.  ie. http://www.domain.com –> https://www.domain.com Option 1:  If you know how to edit the web.config file, just paste the following text within your system.webserver tags: <rule name=”forceHTTPS” stopProcessing=”true”> <match url=”(.*)” /> <conditions> <add input=”{HTTPS}” pattern=”off” /> </conditions> <action type=”Redirect” redirectType=”Found” url=”https://{HTTP_HOST}/{R:1}” /> </rule> Option 2:  Using the IIS Manager, follow these steps. Under sites, select the site that you want this rule to apply to On the right pane, you will see URL Rewrite, double click it (if it’s not installed, then you have to install…

  • Hosting,  Windows

    CBS.log file huge? Can I delete the files?

    Problem:  In the c:\windows\Logs\CBS folder, you see that there is a huge cbs.log file and/or other cbspersist_0000.cab files that are huge in size (some over 2Gb).  Can these be deleted? Resolution:  In short, yes, IF you are sure that there is nothing wrong with the system in question.  Typically, if your system is a production system, it is best to move the files and then test to see if everything still functions normally.  If you are in a virtual environment, snapping the server before you do anything should be a rule of thumb. STEPS: Navigate to your services and stop the “Windows Module Installer” service Move/Delete anything that starts with…

  • Hosting

    WSUS 3.0 sp2 not showing Windows 2012 servers

    Problem:  WSUS does not display the Windows 2012 servers even though group policy has been applied.  You run gpresult /r and see that there are no issues group policy-wise. Resolution:  WSUS needs to be updated with the following patch.  This will allow for the servers to be displayed properly. https://support.microsoft.com/en-us/kb/2734608

  • Hosting,  Support,  VMWare,  Windows 7

    Extended partition via diskpart, Windows not showing extra space

    Issue:  After adding disk space to a VM, you run diskpart to extend the partition. Diskpart shows it is extended, but Windows explorer does not recognize the extra disk space.                     Resolution:  This is a pretty simple fix.  While still in diskpart, make sure you are on the partition that you need, then type:  EXTEND FILESYSTEM, hit F5 on Windows explorer and you should see the space now.

  • Hosting,  Linux

    Postfix outgoing address change

    ISSUE:  When you install Postfix, the default outgoing address on that server will be apache@machinename.local. RESOLUTION:  To change the outgoing address or the FROM address from your mailings, make the following changes: edit the /etc/postfix/main.cf file change the mydomain field to your mail domain [mydomain = mydomain.com] Add the following text to the bottom of the file: smtp_generic_maps = hash:/etc/postfix/generic Save the main.cf file and exit edit the /etc/postfix/generic file at the bottom of the file you need to map the email addresses to the ones you want. apache@machinename.local     myemail@mydomain.com root@machinename.local           myemail@mydomain.com @machinename.local                 myemail@mydomain.com (this…

  • Hosting,  Windows

    URL Rewrite Module in Windows 2012, where is it?

    Issue:  Where is the URL Rewrite Module in Windows 2012? Description:  You may have noticed that after installing all the features in the IIS role in Windows 2012, that the URL Rewrite Module is NOWHERE to be found.  This feature was part of the Windows 2008/R2 implementation, but for Windows 2012, it is, what they call, an “extension”…why?!?!!! Resolution:  Ok, this is how you do it. [1] Download the extension directly here:  http://www.iis.net/downloads/microsoft/url-rewrite or [2] Install the Microsoft Web Platform Installer and then choose the extension from there. After the install, remember to either refresh IIS Manager or close and restart the IIS Manager again.  There it is!