admin on September 2nd, 2011

This is a post sent directly from my Android phone.  Sweet!

Tags: ,

admin on September 16th, 2010

sudo ln -s /var/lib/python-support/python2.5/django/bin/django-admin.py /usr/local/bin/

Tags: ,

admin on September 16th, 2010


find {directory} -name '{filename}'
find / -name 'django-admin.py'

http://www.debuntu.org/how-to-find-files-on-your-computer-with-find

Tags:

admin on November 21st, 2009

I found this to be a helpful video when working on this site: http://www.dailymotion.com/video/x4gfqu_introduction-to-drupal_tech.

Read the rest of this entry »

Tags:

admin on November 21st, 2009

I found that the install went fine, but the assets appeared as broken images. This needed a couple things fixed.

  1. Assets are stored in a subfolder inside assets (mephisto/public/assets/www.example.com/{YEAR}/{MONTH}/{DAY}/{IMAGE NAME}). The asset URLs however do not include that subfolder (example.com/assets/{YEAR}/{MONTH}/{DAY}/{IMAGE NAME}). This is fixed in the second block of mod_rewrite code. That subfolder is the name of the your site (click on the “Sites” link in the admin area – “www.example.com”).
  2. The images break if there is no www, so the first mod_rewrite looks at the domain and www if it is missing.

Here is the vhost configuration:

<VirtualHost 11.22.33.44:80>
    ServerName www.example.com:80
    ServerAlias example.com
    DocumentRoot /var/www/web1/web/mephisto/public

    RewriteEngine On

    # Redirect adding leading www to root domain if no subdomain
    RewriteCond %{HTTP_HOST} ^example.com$
    RewriteRule (.*) http://www.example.com$1 [R=301]

    # Redirect assets
    RewriteCond %{REQUEST_URI} ^/assets/.*$
    RewriteCond %{DOCUMENT_ROOT}/assets/%{HTTP_HOST}/$1 -f
    RewriteRule ^/assets/(.*)$ /assets/%{HTTP_HOST}/$1 [QSA,L]
</VirtualHost>

Read the rest of this entry »

Tags:

admin on November 21st, 2009

Well, I am not very familiar with the included markup languages included with Mephisto. I decided to give Markdown with Smarty Pants a try. I found that Daring Fireball had a good overview of the language.

Read the rest of this entry »

Tags:

admin on November 21st, 2009

The command to go back to the previous page

<a href="#" onclick="window.history.go(-1);">Go Back</a>

or

<a href="javascript:void(history.back());">Go Back</a>

Read the rest of this entry »

Tags:

admin on November 21st, 2009

Definitely have trouble moving to production.

  1. make a new rails app in the web directory for that vhost.

    rails APP_NAME -d mysql

  2. move over the app, public, and vendor folders to the production server.

  3. Get latest schema from dev

    rake db:schema:dump

  4. Update the database.yml file

  5. Copy over schema file (found in db folder)

  6. Create new database

    rake db:create RAILS_ENV=production

  7. Load schema

    rake db:schema:load RAILSENV=production (This step didn’t work for me, so I created a migration added the schema contents into that migration and ran rake db:migrate RAILSENV=production)

  8. Update apache configuration:

    pico /etc/apache2/apache2.conf

ServerName www.example.com:80 ServerAlias example.com DocumentRoot /var/www/example.com/rails_app/public

RewriteEngine On

# Redirect adding leading www to root domain if not subdomain specified
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule (.*) http://www.example.com$1 [R=301]

Tags:

admin on November 21st, 2009

This is the basic function for restarting ISPConfig. Remember that you will need to enter your SSL passphrase at this time if you have one. /etc/init.d/ispconfig_server start|stop|restart

The server runs a seperate webserver at: https://www.example.com:81

Read the rest of this entry »

Tags:

admin on November 21st, 2009

When inserting columns into the database you must select your field type. Here is a list of the main ones:

  • binary
  • boolean
  • date
  • datetime
  • decimal
  • float
  • integer
  • primary_key
  • string (255 characters)
  • text
  • time
  • timestamp

Read the rest of this entry »

Tags: