Recently in site Category

Know-it-all asshats

| 1 Comment

One of my biggest pet peeves other than anonymous cowards is the know-it-all asshat. The other night I was trying to find out why some mail from me was being rejected and was picking over the various RBL check sites when I ran across a weird check for my IP. This check led me a post concerning one of the websites I host. Jonnyx has organized the space and science tracks for Dragon*Con for a long while and does so partly through madscientist.org.uk which is part of my web hosting stuff. All that aside this dumbshit decided he knows how the internet works and how I have my stuff setup and decided to play internet detective badmouthing my abilities to manage a server. Well a quick note to Jonnyx and I feel somewhat vindicated as his response to these clowns was quite sharp. Now to remedy this situation in the future I added a little code to my wilpig.com site tonight so it will be really evident should someone try to hit it by IP again. http://173.14.96.225/

Now to explain my setup. My reverse lookup for 173.14.96.225 is set to wilpig.org because at the time I didn't own wilpig.com AND the main reason is to make the email work as my primary mail server calls itself "WILPIG.ORG". Most mail servers properly setup now reject mail from any source that doesn't have a proper reverse lookup. Now then... if you hit the web server by IP you get wilpig.com not wilpig.org because I would like to make a little money from hosting and page design. So there you have it. My stuff isn't thrown together it is actually pretty well thought out. Previously I had it set to default to http://blueboy.wilpig.org but that really has no meaning to anyone but me.

Current Mood:  annoyed

Virtualization woes

| No Comments

As I said the other day the physical build is complete and I started on getting the rest of the work for my new server done. I have installed three virtual machines on it now a linux(hosting), a windows(wilpig) and my netware(wilpig_srv) test server. The windows machine went okay and I think I have sound working on it now, the linux is there but I can't get the vmware tools to compile and then the netware has given me some trouble. I can't seem to keep tomcat from crashing. Most likely when I did the migration I just copied in a bad file or missed a file some place but I can't tell what it is. I will get back to it later cause tomcat is really unnecessary at this point. I work tonight at midnight again so I plan to do my work stuff then sit down and start the battery of tests it will take to get my linux box migrated over. I can't remember all the perl modules that have to be compiled but I know there are several.

In other news I met a nice girl and hope to see more of her. Also I went ahead and got a litter-robot for eve and ziggy and have had relative success with it thus far. Ziggy seems to have no trouble with it at all but eve has not been the most accommodating. She will use the box to pee but will not poo in there.... Yesterday I showed her the mess she made then put it in the box and showed it to her again and she looked interested at that point. Haven't had to clean up a mess today, yet. That should do for now.

Current Mood:  tired

Apache proxying

| No Comments

Time for another installment of stupid linux tips and tricks. Tonight I will give you a fun recipe for website proxying that can be used to pass sites to a backend host or just outright proxy to a different network like I did when I was moving and neglected to update my DNS with the right timeouts.

Okay so first things first you will need some apache modules loaded.

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

These are the basic proxy modules. You will also need the virtual host module for this next bit of fun and it is.

LoadModule vhost_alias_module modules/mod_vhost_alias.so

Okay so now we have all the modules loaded. Onto the config! Apache must have a virtual host named before it will recognize any of the virtual host configs. Ubuntu and suse, I think, have a host already setup so this is the line you are looking for.

NameVirtualHost *:80 or NameVirtualHost *

The next part is purely preference but you will need to make your virtual hosts. I like to keep mine near their content so if I have a website at /home/website/www i'll put the config at /home/website/website.conf and then I would put an include at the bottom of my httpd.conf like include /home/website/website.conf. Whichever virtual host loads first will be the default website that answers anytime someone hits the IP instead of a name. You can also put them in your conf.d directory or if you are on ubuntu under enabled-sites.

<VirtualHost *:80>
Servername wilpig.org
ServerAlias www.wilpig.org
ServerAlias *.wilpig.com

ProxyPass / http://<destination ip>/
ProxyPassReverse / http://<destination ip>/

CustomLog /home/wilbur/logs/wilpig.org/access_log combined
ErrorLog /home/wilbur/logs/wilpig.org/error_log

</VirtualHost>

Alright here is an example so I will explain the bits and pieces. First you have to have the server name and you will want to specify any alternate names that you might want to use with this site as well. So my default site is wilpig.org and then I gave it the aliases of www.wilpig.org and *.wilpig.org. The *.wilpig.org is a catch all so I can point any ole name at it and it will resolve back to my main site. Next you have the proxy commands. They are relatively simple which instruct the server on how to rewrite the links to pull the content up correctly. Finally we have the log directives. I'm sure you are asking yourself why the heck I would log my proxy traffic and the simple answer is the webserver will show all the traffic as coming from the proxy instead of the real clients which makes the logs almost useless.

You can do some funny things with this setup like use a host name instead of an IP. I setup a few hosts for my change over in the hosts table. The proxy for my server move was set as http://wilpig.org/ and the server looked at the host table for the IP instead of me specifying it. By setting it up with the host name you can proxy a site to another virtual site if needed.

And that concludes this next installment of my stupid linux tricks.

Movabletype 4.2 Beta

| No Comments

Just checking to make sure this upgraded okay and everything is working. So far a few of my plugins seem to be dead but that is to be expected.

Take 2.

Testing out MediaManager 2.0 beta 2

| No Comments

300 (Widescreen Edition)
After I got back from RHPS tonight I sat down to see what neat things I could do with Movable Type. I hadn't looked at the newest plugins in a while so I added in a few new ones. This media manager can import content from Amazon, like this DVD, videos from youtube and photos from flickr. Well I have the flickr stuff in but it doesn't seem to work right yet. Currently it can only use a single API key which only gives you access to the photos on my flickr account which is empty. Anyhow added that, updated visitor stats and hp blog printing. I am considering purchasing a license for visitor stats pro because the author has really put out alot of content and I would like to see him continue doing so. Plus the added statistics would be a neat thing to see.

On other notes my sleeping has gotten really fucked up lately. I am again sleeping through both of my alarm clocks and not being able to get to sleep til 1 or 2 each morning.

Current Mood:  depressed

Refeed: How we got it to work

| No Comments

First off since Movable Type 4.0 has been released I have been trying to get this plugin, refeed, to work. Finally after much gnashing of teeth and many swear words I decided I needed to find out if my perl install was even good or not. I couldn't find a ready script to test the perl modules that this plugin were using so I had to learn a little perl. I came up with the script below using the docs at cpan as a guide. So now I have this script that reads in an rss feed and then spits out the title of the feed followed by the time the article was published. This is where I discovered or at least confirmed what my problem with refeed was. XML::Feed wasn't properly reading in the time. <pubDate>2007-10-12 10:20:49-0400</pubDate> So now we know it isn't reading the time in right so what I did was enlisted the help of Corydon and he told me to change my $issued = $entry->issued; to my $issued = $entry->issued || DateTime->now(); the addition the line tells the script if the first field is undefined use this instead which is the current time. This has a few problems like all the posts from a feed would be read in the first time as all being posted at the same time after the initial pull it becomes less of a problem.

#!/usr/bin/perl

use Feed::Find;
use URI::Fetch;
use XML::Feed;

$url="http://www.memestreams.net/users/wilpig/?type=rss";

my @feeds = Feed::Find->find($url);
for my $uri (@feeds) {
print "$uri \n";
    my $res = URI::Fetch->fetch($feeds[0])
        or $warn->("Can't fetch feed $feeds[0], skipping"), next;

    my $feed = XML::Feed->parse(\$res->content)
        or $warn->("Can't parse feed $feeds[0], skipping"), next;

     for my $entry ($feed->entries) {
        my $id = $entry->id;
# Uses the current time if no time is found.
#        my $issued = $entry->issued || DateTime->now();
        my $issued = $entry->issued;
        $issued->set_time_zone('UTC');
        print "$id \n $issued \n";
     }
}

So after knowing what the problem was I asked again in #se2600 for some further help. Critch offered and helped me find a work around to this perl module not reading in the time correctly. So he had me edit /usr/lib/perl5/site_perl/5.8.8/XML/Feed/RSS.pm and we changed starting at line 224. This was the original section.

                my $parser = DateTime::Format::Mail->new;
                $parser->loose;
                $date = $parser->parse_datetime($ts);

and here is what we changed it to so that we knew exactly what format the time would be in once it was set to be parsed.

                my @time = localtime(HTTP::Date::str2time($ts));
                my $stringtime = Date::Format::strftime("%a, %d %b %Y %H:%M:%S %z",@time);
                my $parser = DateTime::Format::Mail->new;
                $parser->loose;
                $date = $parser->parse_datetime($stringtime);

This works as intended. However it does throw up a warning each time it is run talking about a difference in format but it doesn't seem to bother anything. Almost forgot at the top of the file we had to add in:

use HTTP::Date;
use Date::Format;

For the other modules we were using in parsing the time format.

There you have it. My test script to ensure that the perl modules are installed correctly and functioning and the changes we made to RSS.pm as well. Hope this helps someone.

RSS Feeds

| No Comments

Okay you've probably seen all the posts tonight and wondered what is up. Well after much work we finally got refeed working! I am going to do a little more fine tuning on it to see if I can't make it more pig friendly but now if I post on memestreams it should appear here as well. I'll post the details of the patch we made to the refeed.pl tomorrow after I have had some sleep. I have a really bad headache now from skipping dinner and gonna try to sleep it off.

Current Mood:  hurting

OpenID Login Enabled

| 2 Comments

A few weeks back I loaded a neat little plugin from mt-hacks that added the OpenID server functionality to my movabletype setup. This was all neat and good now I could login to other sites but I was not very happy with it because when I logged in using my ID it showed me up as http://blog.wilpig.org and not really myself as the example had shown. So I left a comment for the author of the plugin and he responded about how to make it show my name instead of the site. He pointed me to Wikipedia to learn about something called Foaf(friend of a friend). Which led me to neat little sites like this that can help you build a foaf file. After some digging and rereading what he posted back I found the magic missing ingredient.

<link rel="meta" type="application/rdf+xml" title="FOAF" href="foaf.rdf" />

This is how you can reference a foaf id file in the header of any html document. So I went ahead an build myself a foaf file inside of movabletype and put the above line in the head of the document. Now when I login to other sites using my OpenID it shows up as Wilbur Longwisch. Many thanks go out to Mark for this really nice plugin.

Example foaf.rdf:

<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:foaf="http://xmlns.com/foaf/0.1/"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
  <foaf:Person>
    <foaf:name>Wilbur Longwisch</foaf:name>
    <foaf:firstName>Wilbur</foaf:firstName>
    <foaf:surname>Longwisch</foaf:surname>
    <foaf:mbox_sha1sum>ba8c001a08e7dd5960a2e806fdef52d67a5a8284</foaf:mbox_sha1sum>
    <foaf:homepage rdf:resource="http://blog.wilpig.org/" />
    <foaf:nick>Wilpig</foaf:nick>
    <foaf:depiction rdf:resource="http://www.wilpig.org/~wilbur/webcam/locked/webcam.jpg" />
    <foaf:workplaceHomepage rdf:resource="http://www.icscci.com"/>
    <foaf:holdsAccount>
      <foaf:OnlineAccount>
        <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/OnlineChatAccount"/>
        <foaf:accountServiceHomepage rdf:resource="http://www.freenode.net/irc_servers.shtml"/>
        <foaf:accountName>Evilpig</foaf:accountName>
      </foaf:OnlineAccount>
      <foaf:aimChatID>wilpigorg</foaf:aimChatID>
    </foaf:holdsAccount>
  </foaf:Person>
</rdf:RDF>

Current Mood:  accomplished

No real topic

| No Comments

I am once again stuck over the Ohio river and was going to make a quick post about some of the movabletype changes I have been making. First off I have installed several more login types the latest being AOL. I now have the YouTube pluging working that I might buy if I start using YouTube more. I am still trying to get refeed to work but it is giving me errors about dates and all types of things. I still have a few other errors on the backend that I am working on clearing up.

Current Music:  Rob Zombie - Feel So Numb

Old style keywords entry

| No Comments

The MT4 upgrade broke my keywords plugin because the entry page changed from a text box to an input box. So after a little reading and posting on the forums I started digging on my own. I found what I was looking for on Line 999 in "/tmpl/cms/edit_entry.tmpl".

You have to change this line:

<input name="keywords" id="keywords" class="full-width" tabindex="8" value="<$mt:var name="keywords" escape="html"$>" mt:watch-change="1" autocomplete="off" />

to this:

<textarea name="keywords" id="keywords" class="full-width" tabindex="8" mt:watch-change="1" autocomplete="off" /><$mt:var name="keywords" escape="html"$></textarea>

The formatting is just a hair off but I don't feel like tracking down the div or whatever style element is causing it. At least I can put in multiple keywords again to make my other plugins work.

Current Mood:  tired

Semi-Live Cam

February 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28            

Archives

WoW

Powered by Movable Type 4.25