Thursday, November 20, 2008

How to post XML code on Blogger

Yes, my last post made me think for a little while. I wanted to post XML code on Blogger, but it could have been HTML for all Blogger cares. What I had to do was encode the code. Rather than do it the tedious way by hand I choose to use a site such as to encode it for me.

Once I had the code encode and pasted back into Blogger everything worked out as expected.

Windows Firewall Allow Remote Administration using the netsh command

This is a quick oneliner that I have used in the past.  I forget it now and then and always have a hell of a time looking it up again.  I use it to allow my Spiceworks monitoring software access to the PC's so it can do it's thing.

netsh firewall set service remoteadmin enable

You could also add this to a WPKG package with the following code.

<package id="XPFirewallRemoteAdmin" name="Allow Remote Admin" revision="1" reboot="false" notify="false" priority="2" execute="once">
<install cmd='netsh firewall set service remoteadmin enable' />

Friday, November 14, 2008

Adding a Virtual Host to Apache2 based on Port

Today I had to setup an internal testbed server for one of our websites.  I didn't want to create a new host name for the site on our Apache server so I went with port based virtual hosts.

There are a few things you need to add for this to work.  My first attempt to make this happed in Webmin didn't produce the results I wanted, so I turned to my trusty text editor vi.

vi /etc/httpd/conf/httpd.conf

Now I had to add in a line similar to:
Listen 8080

Also you have to tell apache to use name based virtual hosting. So add in the line:
NameVirtualHost *:8080

Then finally you can create the directives for your virtual host.
DocumentRoot /your/path/here