顯示具有 apache 標籤的文章。 顯示所有文章
顯示具有 apache 標籤的文章。 顯示所有文章

2008年11月2日 星期日

Speeding Up Your Web Site, expire header in apache and lightted

http://developer.yahoo.com/performance/rules.html
http://httpd.apache.org/docs/1.3/mod/mod_expires.html
http://phaedo.cx/archives/2007/07/25/tools-for-optimizing-your-website-etag-and-expire-headers-in-django-apache-and-lighttpd/

gzip compression, apache settings, speed up

http://letmehaveblog.blogspot.com/2007/09/using-gzip-compression-in-web-servers.html
http://httpd.apache.org/docs/2.0/mod/mod_deflate.html
http://www.blogjava.net/site120/archive/2007/02/16/100073.html

2008年10月17日 星期五

passenger, mod_rails

http://www.modrails.com/install.html
http://ihower.idv.tw/blog/archives/1741
http://nubyonrails.com/articles/ask-your-doctor-about-mod_rails
http://duckpunching.com/passenger-mod_rails-for-development-now-with-debugger
http://www.modrails.com/documentation/Users%20guide.html
  1. Open a terminal, and type:
    gem install passenger
  2. Type:
    passenger-install-apache2-module
  3. /etc/apache2/apache2.conf
    LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so
    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.0.3
    PassengerRuby /usr/bin/ruby1.8

    RailsEnv development <= development mode, default is production mode
  4. /etc/apache2/sites-available/iwakela
  5. <virtualhost>
    ServerAdmin iwakela@localhost

    ServerName iwakela.local
    DocumentRoot /home/lake/rails_app/iwakela/public
    </virtualhost>
  6. sudo ln -s /etc/apache2/sites-available/iwakela /etc/apache2/sites-enabled/001-iwakela
  7. /etc/init.d/apache2 restart/start/stop
  8. /etc/hosts
  9. 127.0.1.1 iwakela.local

    enable debugger

  10. # ... bottom of your development.rb

    if File.exists?(File.join(RAILS_ROOT,'tmp', 'debug.txt'))
    require 'ruby-debug'
    Debugger.wait_connection = true
    Debugger.start_remote
    File.delete(File.join(RAILS_ROOT,'tmp', 'debug.txt'))
    end


  11. # add this rake file to your lib/tasks folder
    # File: restart.rake
    task :restart do
    system("touch tmp/restart.txt")
    system("touch tmp/debug.txt") if ENV["DEBUG"] == 'true'
    end


  12. rake restart DEBUG=true


  13. rdebug -c