Category O/S

howto set up local svn repository

Objective Set up a local svn repository to store some code Install subversion yum install subversion Repository Setup We will set up a path to store the repositories then create the initial repository mkdir -p /usr/local/svn svnadmin create /usr/local/svn/repo1 Initial…

nginx redirect single url

Objective Using nginx redirect single url Example ORIGINAL URL: REDIRECT TO: nginx basic php location block example location / { try_files $uri $uri/ @mylocation; } location @mylocation { rewrite ^/foo(.*)$ /bar/ redirect; rewrite ^.*$ last; } nginx…

curl test https redirect

Testing an https redirect In this example we will be testing an https redirect via curl curl test https redirect Syntax curl -k –head http://someurl Example [root@interweb ~]# curl -k –head HTTP 301 Moved Permanently Connection: close Location: …

sed delete all lines after

Objective: Prep dev httpd.conf for production Tasks: Remove jenkins virtual host entry (which starts with a comment line “#Start Jenkins”) Replace .dev with nothing (ex: www.dev.example.com becomes www.example.com) Replace debug with error (ex: Loglevel debug becomes Loglevel error) Sed to…

rollback httpd.conf changes on error

To rollback httpd.conf changes on error use this script: #!/bin/bash #File: deploy_new_httpd_conf.sh #Define this PATH_TO_NEW_HTTPD_CONF=”~” #Backup old httpd.conf file /bin/cp -f #Copy new httpd.conf over the existing one /bin/cp -f ${PATH_TO_NEW_HTTPD_CONF} #Test the Syntax /usr/sbin/apachectl -t if…

wget warm drupal cache

Objective: Warm Drupal Cache I wrote this script to warm the cache of a drupal site Script Contents #!/bin/bash -ex # Locate the binaries MKDIR=”$(which mkdir)” RM=”$(which rm)” WGET=”$(which wget)” #************************************ #### YOU MUST DEFINE THESE PATH_CACHE_ROOT=”/root/some_dir_name_to_store_data” PATH_LOG_FILE=”” URL_TO_CACHE=”” USER_AGENT=”Mozilla…

Howto use command line SVN on Mac OSX

[wp_ad_camp_2] Objective Use the command line SVN client on Mac OS X Subversion was built to be used with the command line subversion client (not the bastardized GUI clients that are being sold on the market right now). As such…

psexec icacls remote computer

Set proper permissions in IIS 7.x on a remote computer We will be using psexec icacls on the remote comptuer Objective: Grant NT AUTHORITY\NetworkService the proper permissions for a particular website on “somecomputer” using credentials “somedomain\someuser somepassword” The Command to…