Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Hilarie

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

Add a New Rails App (Textdrive & Lighttpd)

Based on: http://forum.textdrive.com/viewtopic.php?id=5094

Get Lighttpd working on Textdrive first (http://manuals.textdrive.com/read/book/9), then to add new Rails apps (ex: typo.domain.tld) follow the steps below...

1. ssh into your account
ssh username@servername.textdrive.com


2. Create a new directory for your rails apps (if you don't have one already):
mkdir ~/apps/ (or whatever you want to name it)


3. Move into that directory:
cd ~/apps/


4. svn checkout the app you want:
Example:
svn checkout svn://leetsoft.com/typo/trunk typo


5. Move into that new app's directory:
Example:
cd typo


6. Change the first line of appname/public/dispatch.rb and appname/public/dispatch.fcgi to:
#!/usr/local/bin/ruby18


7. Set-up MySQL database:

a.
mysql -u username -p

b.
create database textdriveusername_appname;

c.
exit;

d.
mysql -u username -p textdriveusername_appname < db/schema.mysql.sql


8. Create a symbolic link to your app's public folder, inside of your public_html folder:
ln -s /home/username/apps/appname/public /home/username/public_html/appname


9. Add an $HTTP["host"] entry into your lighttpd.conf for the new app (ex: http://textsnippets.com/posts/show/6 and http://textsnippets.com/posts/show/187)

10. Kill all your dispatch.fcgi processes and your lighttpd process (ex: ttp://textsnippets.com/posts/show/206)

11. Restart lighttpd:
/usr/local/sbin/lighttpd -f /home/username/lighttpd/lighttpd.conf


12. Navigate to http://appname.yourdomain.tld


Kill Lighttpd & dispatch.fcgi Processes

From: hhttp://forum.textdrive.com/viewtopic.php?pid=43091#p43091

Kill the processes with:
killall -9 -u your_username lighttpd
killall -9 -u your_username ruby18

...or do a
ps aux

Look for the lighttpd and ruby18 process, take note of their PID (process ID - the first number in the row) and do a:
kill -9 pid (replacing pid with the PID you found)


« Newer Snippets
Older Snippets »
2 total  XML / RSS feed