-->
2004年09月09日
apache+named配置虚拟主机 系统:Mandrake10.0,RH9下面的named一直搞不定,下午再看看。 1. apache的安装和配置: 到64.123或者apache的官方主页上下载一个httpd-2.0.50.tar.gz,依次 #tar xvzf httpd-2.0.50.tar.gz #./configure --prefix=/www/apache;make;make install 编辑/www/apache/conf/httpd.conf,做了其它基本配置之后,到文件的section3,修改如下,添加两个虚拟主机: # # Use name-based virtual hosting. # NameVirtualHost *:80
# # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # <VirtualHost *:80> ServerAdmin kingpaul@ustc.edu DocumentRoot /www/apache/htdocs ServerName kingpaul.infonet.org ErrorLog logs/kingpaul.infonet.org-error_log CustomLog logs/kingpaul.infonet.org-access_log common </VirtualHost>
<VirtualHost *:80> ServerAdmin sunshine@ustc.edu DocumentRoot /www/apache/sunshinedocs ServerName sunshine.infonet.org ErrorLog logs/sunshine.infonet.org-error_log CustomLog logs/sunshine.infonet.org-access_log common </VirtualHost>
保存退出,然后在/www/apache/htdocs和/www/apache/sunshinedocs添加不同的主页文件,最后: #/www/apache/bin/apachectl start 启动httpd 2. named的安装配置 我的linux是ftp安装的,因此只要用下面这条命令就给我把named装上了,很简单。 #urpmi name 编辑/etc/named.conf,在options字段添加: forward first; forwarders { 202.38.64.1; }; 再添加如下语句: zone "infonet.org" { type master; file "name2ip.db"; allow-update {localhost;}; };
保存退出。然后在/var/named/下添加一文件name2ip.db,编辑内容为: $TTL 86400 @ IN SOA kingpaul.infonet.org. root.kingpaul.infonet.org. ( 2001111601 28800 14400 3600000 86400 )
IN NS kingpaul.infonet.net IN A 192.168.3.153
kingpaul IN A 192.168.3.153 sunshine IN A 192.168.3.153 jbhuang IN A 192.168.3.69 lab IN A 192.168.3.1 localhost A 127.0.0.1
然后,编辑/etc/resolv.conf,添加字段 search infonet.org servername 192.168.3.153 最后: #serice named restart 启动named
3. 在另外一台机器上,将DNS服务器设置为192.168.3.153,nslookup kingpaul.infonet.org和nslookup sunshine.infonet.org发现两者地址是一样的,打开IE,地址敲kingpaul.infonet.org和sunshine.infonet.org,可打开不同的主页,虚拟主机设置成功。
kingpaul @ 02:09 PM 发表于 linux | 编辑 | 留言 (1) | TrackBack (0)
2004年08月31日
proftpd安装与配置
xinetd模式: http://www.17lan.com/mc_631.html standalone模式: http://www.fanqiang.com/a6/b2/20011020/0905001485.html 一个proftpd配置例子: http://blog.csdn.net/swordzjj/archive/2004/06/30/30490.aspx
kingpaul @ 10:09 AM 发表于 linux | 编辑 | 留言 (0) | TrackBack (0)
2004年08月30日
与openssh有关的东东
一、安装和配置openssh server: 1 安装软件包(略)。 2 OpenSSH服务器配置文件:/etc/ssh/sshd_config 3 penSSH服务器状态:#service sshd status 4 启动/停止/重启enSSH server:#service sshd start/stop/restart 5 设置OpenSSH server默认启动: #chkconfig --level 35 sshd on #ls /etc/rc3.d/|grep sshd 二、scp:从远程主机复制文件到本机 #scp root@192.168.3.119:/etc/passwd . 三、sftp:使用ssh协议的ftp
kingpaul @ 03:23 PM 发表于 linux | 编辑 | 留言 (0) | TrackBack (0)
(笔记)linux配置telnet服务器
1. 安装telnet-server软件包。(略) 2. 设置telnet-server的启动运行 telnet server不作为独立的服务器程序运行,而是受xinetd程序的控制,启动配置文件为/etc/xinetd.d/telnet,默认xinetd程序并不启动该服务,可在chkconfig --list看出telnet是关闭的,/etc/xinetd.d/telnet中disable=yes可通过下面的方式启动telnet server: 1) chkconfig telnet on //该命令修改了/etc/xinetd.d/telnet的配置,设置disable=no 2) service xinetd restart 再次chkconfig --list看到telnet server已经启动。
kingpaul @ 11:19 AM 发表于 linux | 编辑 | 留言 (0) | TrackBack (0)
500 - 内部服务器错误。
您查找的资源存在问题,因而无法显示。