本站首页    管理页面    写新日志    退出


«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31


公告
 本博客在此声明所有文章均为转摘,只做资料收集使用。

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:1304
评论数量:2242
留言数量:5
访问次数:7594687
建立时间:2006年5月29日




[网站架构]Install Apache2 On Debian
软件技术

lhwork 发表于 2007/1/15 16:27:09

#apt-cache search apache2 #apt-get insall apache2 #apt-get install libapache2-mod-php4 #apt-get install libapache2-mod-python2.3 #apt-get install apt-get install ruby1.8 ruby1.8-examples #ruby1.8 -version// ruby version info #apt-get install libapache2-mod-ruby libfcgi-ruby1.8 libfcgi-dev #apt-get install libapache2-mod-perl2 #apt-get install mysql-server-4.1 mysql-client-4.1 #apt-get install php4-mysql #apt-get install python2.3-mysqldb #apt-get libdbd-mysql-ruby1.8 // Ruby/DBI MySQL driver for Ruby 1.8 #apt-get install libdbd-mysql-perl // A Perl5 database interface to the MySQL database #apt-get install postgresql // install postgresql 7.4.7 #apt-get install php4-pgsql // PostgreSQL module for php4 #apt-get install python2.3-pygresql // PostgreSQL module for Python #apt-get install python2.3-pgsql // A Python DB-API 2.0 interface to PostgreSQL v7.x #apt-get install libdbd-pg-ruby1.8 // Ruby/DBI PostgreSQL driver for Ruby 1.8 #apt-get install libpg-perl // Perl modules for PostgreSQL 目录[隐藏] 1 修改Apache2 2 配置PHP 3 配置Python 4 配置Perl 5 配置Ruby [编辑] 修改Apache2vi /etc/apache2/sites-enabled/000-default #RedirectMatch ^/$ /apache2-default/ [编辑] 配置PHP 把PHP脚本放在 /var/www 目录下就可以支持运行啦。 [编辑] 配置Python vi /etc/apache2/sites-enabled/000-default, 加入以下内容 <Directory /var/www/python/> SetHandler mod_python PythonHandler mod_python.publisher </Directory> 在/var/www/python 目录下创建.htaccess文件 SetHandler mod_python PythonHandler mod_python.publisher PythonDebug On 创建index.py文件 def index(name): return "Welcome %s" % name http://localhost/python/?name=huihoo (OK :) [编辑] 配置Perl vi /etc/apache2/sites-enabled/000-default, 加入以下内容 Alias /perl/ /var/www/perl/ <Location /perl/> SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI Order allow,deny Allow from all </Location> touch index.pl #!/usr/bin/perl print "Content-type: text/plain\n\n"; print "mod_perl \n"; http://localhost/perl/index.pl (OK :) [编辑] 配置Ruby ruby在apache里是以cgi或是fastcgi的形式运行的。 vi /etc/apache2/sites-enabled/000-default, 加入以下内容 Alias /ruby/ "/var/www/ruby/" <Location /ruby/> Options ExecCGI AddHandler cgi-script .cgi AddHandler fastcgi-script .fcgi .fcg .fpl AllowOverride all Order allow,deny Allow from all </Location> touch index.fcgi #!/usr/bin/ruby1.8 print "Content-type: text/plain\n\n"; print "ruby \n"; 参考: http://wiki.rubyonrails.com/rails/pages/GettingStartedWithRails RailsOnDebianStable - http://wiki.rubyonrails.org/rails/pages/RailsOnDebianStable 取自"http://wiki.huihoo.com/index.php?title=Install_Apache2_On_Debian"


阅读全文(1652) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.297 second(s), page refreshed 144755654 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号