Change WordPress Permalink Structure

I recently wanted to change my permalink structure on this website, and was running into some problems. After switching from the defualt (p?=123 or whatever) every post and page would get a 404 error. I coudln’t figure out why this was happening, as my htaccess was correctly written to. Here are the steps I took to make it work on my site (requires ssh access to modify apache2). This works for Ubuntu Server 12.04.

  1. Install mod_rewrite to your webserver with this command: sudo a2enmod rewrite . Now restart the apache2 service: sudo service apache2 restart .
  2. Change your permalink structure in WordPress (Settings -> Permalinks).

Now it should work, it really is that simple. If you have any problems, please leave a comment below. All of the guides I followed forgot to mention the mod_rewrite in Apache. Hopefully this helps some of you out.

Open source Craigslist clone

logo

A few days ago I had the urge to start a new project aimed at college students. I recall hearing someone say that they wished there was a place for them to find people to “hook-up” with on campus. That got me thinking about Craigslist, but with a twist. Instead of the site being devoted to a geographical location such as a city, my site would be targeted at a specific campus. Once I got the initial idea I had to find some software to implement (why reinvent the wheel?). I tried a few different “Craigslist clone scripts” and the like, but none of them offered what I was looking for. I needed the site to be simple and clean, but also easily manageable. After searching for a few hours I came across OSClass.

If WordPress’ admin UI is a 8/10 in terms of look and functionality, OSClass’ would be a 9 or 10. It is simply fantastic.You can control everything from the easy to use control panel that is very intuitive. So far I haven’t done much more work with the idea, and probably never will. But I was able to tinker around with some cool software, and maybe one day I will implement it for my campus. All I would need to do at this point is buy a domain name (I don’t feel like using a subdomain of willstare.com) and away I will go. I don’t know how much demand there would be for such a site, but people usually have a way of finding innovative uses for things given the opportunity to use it.

So go check out OSClass, you will be very impressed.

osclass front
Main page of my OSClass site.

management 1 osclass
Main dashboard page in the admin panel.

oc class statistics
Some statistics and graphs about the site.

Track blog views with the Top 10 plugin

I was searching for a plugin to use that would count views per post on my site. After trying a couple different plugins, I found the Top 10 plugin which allows for tracking of views per post and page, as well as daily and lifetime views. I like statistics, so it will be fun to see which posts garner the most views. I have a feeling that it will be my MW2 tutorials, as those were linked to from a few websites I used to be a part of.

How to use your domain with Gmail (no Google Apps required)

domain.com

So I was looking for a solution for using a Gmail account with my domain (willstare.com). After finding out that the free version of Google Apps is no longer offered to new customers, I was forced to come up with my own solution. I knew that Gmail allowed users to have an ‘alias address’ to send and receive from, but that required an active email account to work (for verification). Here’s what I did to get around that requirement.

Go to your domain host (I use domain.com), and configure a new email forwarder. You do not need to make an email account, only a forwarder. Forward the email address that you would like to create (ex: test@willstare.com) and point it to a Gmail account (ex: test.willstare@gmail.com). After doing that, make your Gmail account, and login. Open the settings and select Accounts and Import. Then select ‘Send mail as:’ and add your test account that you set up earlier (test@willstare.com).

Now it will require a verification email to be sent to confirm that you own the email account. Because you have already configured the email address to forward to your Gmail account, it will arrive in your inbox, technically confirming that you ‘own’ that address. Enter the verification number, and you should be set. This worked for me, I hope it helps others.

Changes in hosting

dell-poweredge-2950medium

I switched hosts recently to a dedicated server provided by i3d.net. I got a great deal on it, and have been really pleased thus far.

Processor: Intel Xeon X3220 (2.4ghz x4)
Memory:     4gb ddr2
HDD:          250gb x2
OS:            Ubuntu Server 12.04 LTS

The server is a Dell Poweredge, and hasn’t slowed down one bit since it was provisioned. I get 10tb of transfer per month, which is a nice boost from the 2tb i was receiving from VolumeDrive. The server is located in the Netherlands, but latency is not bad at all, and is not important to the duties I have it doing. I plan on keeping the VPS for another month, but I will be dropping my service with VolumeDrive shortly. The node I was on has been crashing often, and their network isn’t as good as it used to be. It was good while it lasted.

 

VolumeDrive.com VPS

I just wanted to make a quick plug for my hosting provider, VolumeDrive. There are a lot of positive/negative reviews out there in regards to VolumeDrive, and I thought I would share my experience with them.

I help run a pretty large gaming clan, and when I  first joined, they were using a volumdrive dedicated server. It had 16gb of ram, 8 threads, etc. It was great, and cheap. However, there was an occasional network drop here and there, and we decided to move to a more stable (and expensive!) company for our vital services. I noticed that VD also provided VPS solutions, so I decided to pick one up for a month (only $5) and see how I liked it. It was quickly provisioned, and I began to mess around with it (I chose Ubuntu Server for my OS). I realized that I could do a lot of cool things with this server, and purchased a hostname and got started.

That was about 7 months ago, and I am still very glad that I made the decision to stay with VD. Their network hasn’t been a problem for me at all, and I have had many services running on my server. The only problem I have had is that the VPS reboots regularly, perhaps once every 7-15 days. This isn’t a deal breaker, as it just requires some cron-jobs to keep things running. Other than that, I really can’t complain about it. I have been pushing a lot of data through it , and it is holding up quite well. I would recommend VD VPS’s to anybody wishing to play around with a server with a big fat network connection.

My VPS Specs:
2ghz processor
1GB ram
50GB HDD
100mbps network connection (2000gb/month)
$5 / month 
Check out http://volumedrive.com/vdrive/?a=vps  for more information on the VPS solutions provided by VolumeDrive.

*I have not received any compensation for this blog post, I just really like the company*

More Shoutcast relays have been added

It came to my attention the a few days ago that the online radio station U7Radio.org was having some trouble meeting demand for their 24/7 Art Bell streams. I decided to donate 300 slots to them, of which, over 175 have been used during the nights. I hope to continue this service, as there is nothing I enjoy more than a server getting some real-world use!

I did some quick math, and found that at 24kbps (the going rate for Art Bell streams) 300 slots uses around 7200kbps, 7.2mbps, or a little less than 1 megabyte per second (900kb/s). That is really minimal when you look at if from that standpoint. I think that my vps could easily push out around 1.5 mb/s for an extended duration, so I have plenty of capacity. The hardest part is getting the listeners to connect to my server IP and not that of the original streams. It seems that many people are not connecting through services such as shoutcast, but through direct IP address of the streams, which fills up the original server, leaving my relays half-full. Perhaps if I keep the relay going for a good while, the owner of the stream can post the IP address of my server so people can program that address into their IP radios.

It will be interesting to see how my bandwidth usage goes up with the new relays. The first two days are already averaging over 40gb per day. I expect that number to maintain, or even grow in the coming weeks. That would push my monthly usage to over 1.2 TB per month. My plan has a 2TB limit, so that is something to look out for. I don’t expect to break that though, as I am not using the server for much else currently. It would be fun to get a box solely dedicated to relays though, and I might invest in one in the future if listenership continues to climb. I could even see renting out a service for $5 a month for a 100slot relay or something similar to that.

In case any of you are wondering, my host is VolumeDrive.com. They are a budget provider, and have mixed reviews online. However, I haven’t really had any complaints about them for VPS hosting, and at the price, they simply CANNOT be beat.  I would recommend them to anybody wanting a low-cost, non mission-critical VPS host to play around with. Their network is Burstnet (so I’ve heard), but it is reliable enough for my needs.

Bandwidth usage on my VPS. It shows how much my network traffic increased with U7Radio’s listeners.

Infrared Photography

Here’s a gallery of some of my better Infrared Shots. Enjoy!

 

 

 

How to configure a shoutcast relay server in ubuntu

So you want to relay your favorite shoutcast stream with your ubuntu VPS, but don’t know where to start? Here’s a quick guide to relaying DNAS v1.9.8 shoutcast server streams.

Step 1: Download the sc_serv_1.9.8 file from this thread, or from another website (afterdawn, shoutcast.com, etc)

sc_serv_1.9.8_Linux.tar.gz

Step 2: Unzip the .zip and .tar, and FTP them to your server. I use /var/shoutcast for my folder root, but that might not be the most secure. You could use /home/shoutcast or anything really.

Step 3: If you are going to run the server as root (not recommended) you can skip this. Otherwise, make an account (ex. shoutcast) and place the files into a folder in their home.

Step 4: Edit the sc_serv.conf using nano or vi. Edit any and all settings that you find fit. Here is what I have mine set as.

[spoiler]

; SHOUTcast Distributed Network Audio Server configuration file
; Copyright (C) 1998-2004 Nullsoft, Inc.
; All Rights Reserved.
; Last modified Mar 17 2004

; If you want to manage multiple configurations, just copy
; this file to another name, and run sc_serv with that name
; such as:
; sc_serv.exe sc_leet.conf

; ***************************
; Required stuff
; ***************************

; MaxUser.  The maximum number of simultaneous listeners allowed.
; Compute a reasonable value for your available upstream bandwidth (i.e. if
; you have 256kbps upload DSL, and want to broadcast at 24kbps, you would
; choose 256kbps/24kbps=10 maximum listeners.)  Setting this value higher
; only wastes RAM and screws up your broadcast when more people connect
; than you can support.
MaxUser=100

; Password.  While SHOUTcast never asks a listener for a password, a
; password is required to broadcast through the server, and to perform
; administration via the web interface to this server.  This server should
; consist of only letters and numbers, and is the same server your broadcaster
; will need to enter in the SHOUTcast Source Plug-in for Winamp.  THIS VALUE
; CANNOT BE BLANK.
Password=************

; PortBase. This is the IP port number your server will run on.  The
; value, and the value + 1 must be available.  If you get a fatal error when
; the DNAS is setting up a socket on startup, make sure nothing else on the
; machine is running on the same port (telnet localhost portnumber — if you
; get connection refused then you’re clear to use that port).  Ports < 1024
; may require root privledges on *nix machines.  The default port is 8000.
PortBase=8100

; ***************************
; Optional Parameters
; ***************************

; ***************************
; Logging configuration
; ***************************

; LogFile: file to use for logging. Can be ‘/dev/null’ or ‘none’
; or empty to turn off logging. The default is ./sc_serv.log
; on *nix systems or sc_serv_dir\sc_serv.log on win32.
; Note: on win32 systems if no path is specified the location is
; in the same dir as the executable, on *nix systems it is in the
; current directory.
LogFile=sc_serv.log

; RealTime displays a status line that is updated every second
; with the latest information on the current stream (*nix and win32
; console systems only)
RealTime=1

; ScreenLog controls whether logging is printed to the screen or not
; on *nix and win32 console systems. It is useful to disable this when
; running servers in background without their own terminals. Default is 1
ScreenLog=1

; ShowLastSongs specifies how many songs to list in the /played.html
; page.  The default is 10.  Acceptable entries are 1 to 20.
ShowLastSongs=10

; TchLog decides whether or not the DNAS logfile should track yp
; directory touches.  Adds and removes still appear regardless of
; this setting.
; Default is yes
; TchLog=yes

; WebLog decides whether or not hits to http:// on this DNAS will
; be logged.  Most people leave this off because the DSP plug-in
; uses http:// calls to update titles and get the listener count,
; which takes up a lot of log space eventually.  If you want to
; see people making hits on your admin.cgi or index pages, turn
; this back on.  Note that this setting does NOT affect XML stats
; counters for hits to http:// pages.
; Default is no.
; WebLog=no

; W3CEnable turns on W3C Logging.  W3C logs contain httpd-like accounts
; of every track played for every listener, including byte counts those listeners
; took.  This data can be parsed with tools like Analog and WebTrends, or given
; to third parties like Arbitron and Measurecast for their reporting systems.
; Default is Yes (enabled).
W3CEnable=Yes

; W3CLog describes the name of the logfile for W3C logging.  Default logfile is
; sc_w3c.log, in the same directory wherever the DNAS gets started from.
W3CLog=sc_w3c.log

; ***************************
; Network configuration
; ***************************

; SrcIP, the interface to listen for source connections on (or to make relay
; connections on if relaying). Can and usually will be ANY or 127.0.0.1
; (Making it 127.0.0.1 will keep other machines from being able to
; broadcast using your shoutcast server )
SrcIP=ANY

; DestIP, IP to listen for clients on (and to contact yp.shoutcast.com)
; can and usually will be be ANY. If your machine has multiple IP addresses,
; set this to the one you want it to be accessed by.
DestIP=ANY

; Yport, port to connect to yp.shoutcast.com on. For people behind caching
; webproxies, change this to the alternate port (666 is what it might be,
; check www.shoutcast.com if you have problems). Otherwise, leave this at 80.
; We’re actively working on re-opening port 666, but as of release the only
; working port is port 80.
Yport=80

; NameLookups.  Specify 1 to perform reverse DNS on connections.
; This option may increase the time it takes to connect to your
; server if your DNS server is slow.  Default is 0 (off).
NameLookups=0

; RelayPort and RelayServer specify that you want to be a relay server.
; Relay servers act as clients to another server, and rebroadcast.
; Set RelayPort to 0, RelayServer to empty, or just leave these commented
; out to disable relay mode.
RelayPort=8000
RelayServer=stream1.yourfavoritestream.com

; ***************************
; Server configuration
; ***************************

; AdminPassword.  This password (if specified) changes the
; behavior of Password to be a broadcast-only password, and
; limits HTTP administration tasks to the password specified
; here.  The broadcaster, with the password above, can still
; log in and view connected users, but only the AdminPassword
; will grant the right to kick, ban, and specify reserve hosts.
; The default is undefined (Password allows control for both
; source and admin)
; AdminPassword=************

; AutoDumpUsers controls whether listeners are disconnected if the source
; stream disconnects. The default is 0.
AutoDumpUsers=0

; AutoDumpSourceTime specifies how long, in seconds, the source stream is
; allowed to be idle before the server disconnects it. 0 will let the source
; stream idle indefinately before disconnecting. The default is 30.
AutoDumpSourceTime=30

; ContentDir specifies the directory location on disk of where to stream
; on-demand content from.  Subdirectories are supported as of DNAS 1.8.2.
; Default is ./content, meaning a directory named content in the same directory
; as where sc_serv was invoked from.
; ContentDir=./content

; IntroFile can specify a mp3 file that will be streamed to listeners right
; when they connect before they hear the live stream.
; Note that the intro file MUST be the same samplerate/channels as the
; live stream in order for this to work properly. Although bitrate CAN
; vary, you can use ‘%d’ to specify the bitrate in the filename
; (i.e. C:\intro%d.mp3 would be C:\intro64.mp3 if you are casting at 64kbps).
; The default is no IntroFile
; IntroFile=c:\intro%d.mp3

; BackupFile can specify a mp3 file that will be streamed to listeners over
; and over again when the source stream disconnects. AutoDumpUsers must be
; 0 to use this feature. When the source stream reconnects, the listeners
; are rejoined into the live broadcast.
; Note that the backup file MUST be the same samplerate/channels as the
; live stream in order for this to work properly. Although bitrate CAN
; vary, you can use ‘%d’ to specify the bitrate in the filename
; (i.e. C:\backup%d.mp3 would be C:\backup32.mp3 if you are casting at 32kbps).
; The default is no BackupFile
; BackupFile=C:\intro%d.mp3

; TitleFormat specifies a format string for what title is sent to the listener.
; For example, a string of ‘Justin Radio’ forces the title ‘Justin Radio’ even
; when the source changes the title. You can use up to one ‘%s’ in the string
; which lets you contain the title from the source. For example, if your
; TitleFormat is ‘Justin Radio: %s’, and the source plug-in’s title is
; ‘Billy plays the blues’, then the net title is
; ‘Justin Radio: Billy plays the blues’. Note: only works on non-relay servers.
; The default is no format string.
; TitleFormat=Justin Radio: %s

; URLFormat specifies a format string for what url is sent to the listener.
; Behaves like TitleFormat (see above).
; The default is no format string.
; URLFormat=http://www.server.com/redirect.cgi?url=%s

; PublicServer can be always, never, or default (the default, heh)
; Any setting other than default will override the public status
; of the source plug-in or of a SHOUTcast server that is being relayed.
PublicServer=default

; AllowRelay determines whether or not other SHOUTcast servers will be
; permitted to relay this server.  The default is Yes.
AllowRelay=Yes

; AllowPublicRelay, when set to No, will tell any relaying servers not
; to list the server in the SHOUTcast directory (non-public), provided
; the relaying server’s Public flag is set to default.  The default is
; Yes.
AllowPublicRelay=Yes

; MetaInterval specifies how often, in bytes, metadata sent.
; You should really leave this at the default of 8192, but the option is
; provided anyway.
MetaInterval=32768

[/spoiler]

The main things that I changed were maxlisteners (set to 100), the passwords, and the relay information.

For the relay, you need the port of the stream, as well as the address. To find this information you must open the listen.pls and find the data in there.

*If you are going to run more than 1 server at a time, you will need to change the portbase. I run my streams at 8100 and 8200.

Step 5:

Now that you have configured your server, ssh in and cd to the appropriate folder. To start the server type

./sc_serv sc_serv.conf

It will now start!

If all goes well, the server will pick up the stream, and start relaying. Shoucast will do some magic, and you will soon be taking some of the load off of the main stream and onto yours. Contact the stream owner ahead of time so you can coordinate reserved slots in their streams.

If you have any questions, please leave them below. Remember, this only works with version 1.9.8!