find {directory} -name '{filename}'
find / -name 'django-admin.py'
http://www.debuntu.org/how-to-find-files-on-your-computer-with-find
Tags: Linux
I found this to be a helpful video when working on this site: http://www.dailymotion.com/video/x4gfqu_introduction-to-drupal_tech.
Tags: Drupal
I found that the install went fine, but the assets appeared as broken images. This needed a couple things fixed.
- 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”).
- 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>
Tags: Mephisto
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.
Tags: Mephisto
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>
Tags: JavaScript
Definitely have trouble moving to production.
-
make a new rails app in the web directory for that vhost.
rails APP_NAME -d mysql
-
move over the app, public, and vendor folders to the production server.
-
Get latest schema from dev
rake db:schema:dump
-
Update the database.yml file
-
Copy over schema file (found in db folder)
-
Create new database
rake db:create RAILS_ENV=production
-
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)
-
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: Ruby on Rails
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
Tags: ISPConfig
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
Tags: Ruby on Rails