Archive for the ‘Web Development’ Category

WebSight Design Advises Morgan Lane Marin In Merger With Pacific Union Real Estate

Thursday, July 23rd, 2009

WebSight Design, Inc. is pleased to announce our role as lead technology consultant to Marin County real estate firm Morgan Lane Marin in their acquisition of Pacific Union GMAC Real Estate, one of the largest real estate brokerage firms in the San Francisco Bay Area.

The deal will bring together 17 Bay Area offices and more than 430 real estate professionals with combined sales volume projected to reach $2.2 billion in 2009.  Morgan Lane Marin is purchasing Pacific Union from Brookfield Asset Management.  As part of the deal, the two companies will continue to operate under their existing names as independently owned and operated franchised companies.

Morgan Lane, Marin County’s premier luxury real estate firm, has grown from $52 million in home sales in 2006 to $315 million in 2008.  Pacific Union was ranked No. 3 on the Business Times’ List of largest Bay Area residential real estate firms for 2008, selling homes with a total value of $3.157 billion.  Morgan Lane Marin CEO Mark McLaughlin, who will lead the new operation, believes that the combined firms will become the Bay Area’s leading luxury real estate brand.

WebSight Design is based in Sausalito, CA. Morgan Lane Marin has offices in Ross, Kentfield, Mill Valley, and Belvedere.  WebSight Design has provided Morgan Lane Marin with web design services, web hosting, technical support, and marketing services for over 10 years.

We look forward to many more years of working with Mark, Tracy, and the rest of the Morgan Lane Marin team.

Relaunch for Santana.com

Tuesday, July 7th, 2009

As you must have noticed, we have been heavy hitting with Carlos Santana in 2009.  In February we released our first iPhone app for Santana and now we are happy to say the newly renovated Santana.com is live!

We have worked very hard on the new and improved Santana.com.  The previous site 9 years old, so this was much more then just a mop and polish! Along with a complete visual redesign, we have added new multi-media sections and updated the functionality and usability of content control.

Santana.com

You will first notice that we have created two unique homepage designs, one that is based on album art and one the is a original concept.  We have also added a “Featured Five” section at the top, this is an interactive banner which will play videos right in the featured area without going to a new page. This is read from updateable XML files, this means easy to update changes to any and all content that is controlled by Flash applications embedded in the site.

Of course, being the smashing web development team that we are, we are well aware of the problems that flash causes in non-compatible browsers, so we have also developed a non-Flash version of the site for use in mobile browsers and any machines that don’t have the Flash plugin.

Make sure you stop by Santana.com and check out all the new features! We hope you enjoy it as much as we do!

How to add a chrooted FTP account for access to a specific dir on a Linux Plesk server

Monday, July 21st, 2008

To add a chrooted FTP user outside of Plesk properly, you need to:

Create the user with the home directory as the root of what they can access
Give the user a password
Make their primary group psacln
Add them to the psaserv group as well
# useradd username -d /var/www/html/website/slideshow/
# passwd username
Enter new password for username
# usermod -g psacln username
# usermod -G psaserv username
You also need to chmod the directory in question to 775

That’s it.

One way to fix Apache serving up the wrong SSL certificate

Monday, June 2nd, 2008

I ran into an issue today on an Ubuntu server running Apache 2 where the server already had an SSL certificate for ‘www.domain.com’ and the client wanted to add a second one for ‘sub.domain.com’.  I added a new IP to the server, set up the virtual site, and generated the CSR and ordered and installed the cert normally, but when I tried to view the new virtual site, it gave me the new site directory but with the old ‘www’ cert, causing a cert name mis-match error.

The old virtual site’s apache config file had the site bound to *:443, so when I added the new site I changed the old one to [Old IP Address]:443, so it wouldn’t conflict with the new one which was bound to [New IP Address]:443. While logically it seemed like that should have worked, it didn’t, and was serving up the old cert for the new site.

I fixed the issue by changing the binding for the old virtual site back to *:443, while leaving the new one on [new IP address]:443. To me, it seems like this shouldn’t work, and that the *:443 would catch all the requests, but apparently that’s how it is supposed to be, and the binding with the IP address overrides the wildcard binding. Who knew?

Configuring MySQL-Python on OSX Leopard

Sunday, April 27th, 2008

At WebSight Design we try to remain technology-agnostic. (The right tool or language for the job.) Having said that, we are primarily a PHP shop. However, with the launch of the Google App Engine, we’ve been looking seriously at Python. In recent years, I have become a big fan of development frameworks so to aide me in learning the ways of the snake, I have been using the Django framework.

Getting it all setup wasn’t difficult. The Django installation is very easy. I started to get errors when I was trying to get my models working when I ran

manage.py syncdb

. Come to find out that I needed the MySQL-Python library installed to work correctly on my OSX Leopard machine. Most everything that I illustrate below is to be executed from the command-line. So if you are not familiar with working in the Terminal app, this post is gonna suck for you. So here is what I did to get it working:

First, download MySQL for Python
http://sourceforge.net/projects/mysql-python
for me it was MySQL-python-1.2.2.tar

Unpack it:

tar -xzf MySQL-python-1.2.2.tar

Change to the directory that is created:

cd MySQL-python-1.2.2

Next, locate your “mysql_conf” file.

locate mysql_conf

Copy the location of this file so you can use it in the next few steps.

Next, you need to edit the “site.cfg” file and add the path to your “mysql_conf” file.

mysql_config = "YOUR_PATH_GOES_HERE"

Also, (very important), change the line that reads:

threadsafe = True

TO

threadsafe = False

Save and exit the file.

Now, compile and install the library:

python setup.py build
sudo python setup.py install

NOTE: You may need to run “python setup.py clean” if you previously tried to build and install the library.

Next is the *really* important part. After I kept getting errors trying to run the Python server I found the missing piece on the ProjectMouse.org site.

The key is, you need to create a symbolic link in the location that Python is expecting to find MySQL. This should be a link to the MySQL library that your computer is setup to use.
See here:

sudo mkdir /usr/local/mysql/lib/mysql/
sudo ln -s /usr/local/mysql-5.0.41-osx10.4-i686/lib/libmysqlclient_r.15.dylib /usr/local/mysql/lib/mysql/libmysqlclient_r.15.dylib

NOTE: “mysql-5.0.41-osx10.4-i686″ is where MySQL is installed on my machine. Change this to the location specific to your computer.

Finally, import MySQLdb into Python and test your configuration:

python
import MySQLdb

NOTE: You should not see any errors or warnings. Hit “Ctrl+d” to exit the interepter.

Now go back and run

manage.py syncdb

again and you should not get any errors.

Allowing PHP to write files in a Plesk server environment

Thursday, March 27th, 2008

As you may have found out, a web server that houses a bunch of web sites can cause some issues with file permissions when it comes to allowing PHP to write files that a web site needs, whether it is a data file, a document or an image. This is usually not an issue if PHP is installed as a cgi module because cgi programs are usually setup to run as the user that owns them, but Plesk uses PHP installed as an Apache module, and thus it runs as the same user that Apache runs as, which is usually not the same user that owns the website files.

How to solve this? It is really easy actually. There are 2 possible solutions, the first is the easiest, but really shouldn’t be considered and that is to make the folders that PHP needs to write to 0777, which opens a possible security hole and that is why you shouldn’t really consider it.

The second is to simply add the user apache uses, which under Plesk is usually “apache” to the group “psacln”. You can edit the /etc/group and /etc/group- files if you know what you are doing, or use usermod.

If you want to edit the files directly, locate the line that looks like this:

psacln:x:2524:

and just tack on “apache” to the end of it like so…

psacln:x:2524:apache

Do this for both files and restart apache and you are done.

Or, simpler

/usr/sbin/usermod -a -G psacln apache

Then simply make the folders and/or files that php needs access to 0775, which makes it more secure.

You can do similar with any server enviroment, we just happen to use Plesk here.

Rob