您的位置:首页 > 运维架构 > Linux

linux下lamp+postfix+extmail+extman

2012-04-14 18:13 330 查看
系统版本Red Hat Enterprise Linux Server release 5.4 (Tikanga)





一 配置dns服务
1. 配置本地yum
[root@localhost ~]# mkdir /mnt/cdrom
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
[root@localhost ~]# vim /etc/yum.repos.d/rhel-debuginfo.repo
1 [rhel-debuginfo]
2 name=Red Hat Enterprise Linux Server
3 baseurl=file:///mnt/cdrom/Server
4 enabled=1
5 gpgcheck=1
6 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release
2. 配置dns
[root@localhost ~]# yum install bind bind-chroot caching-nameserver
[root@localhost ~]# cd /var/named/chroot/etc/
[root@localhost etc]# cp -p named.caching-nameserver.conf named.conf
[root@localhost etc]# vim named.conf
15 listen-on port 53 { any; };
27 allow-query { any; };
28 allow-query-cache { any; };
37 match-clients { any; };
38 match-destinations { any; };
[root@localhost etc]# vim named.rfc1912.zones
21 zone "moyang.cn" IN {
22 type master;
23 file "moyang.cn.db";
24 allow-update { none; };
25 };
[root@localhost etc]# cd ../var/named/
[root@localhost named]# cp -p localhost.zone moyang.cn.db
[root@localhost named]# vim moyang.cn.db

1 $TTL 86400
2 @ IN SOA bs.moyang.cn. root (
3 42 ; serial (d. adams)
4 3H ; refresh
5 15M ; retry
6 1W ; expiry
7 1D ) ; minimum
8
9 @ IN NS ns.moyang.cn.
10 ns IN A 192.168.1.1
11 mail IN A 192.168.1.1
12 pop3 IN CNAME mail
13 smtp IN CNAME mail
14 @ IN MX 10 mail
~

测试
[root@localhost ~]# service named start
启动 named: [确定]
[root@localhost ~]# nslookup mail.moyang.cn
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: mail.moyang.cn
Address: 192.168.1.1
[root@localhost ~]# chkconfig named on 开机自启动
更改主机名
[root@localhost named]# vim /etc/sysconfig/network

1 NETWORKING=yes
2 NETWORKING_IPV6=no
3 HOSTNAME=mail.moyang.cn
重启使主机名更改生效
[root@localhost ~]#init 6

进行以下步骤前看看需要的各种包,我将它们放到~/file目录下
[root@mail file]# ll
总计 75504
-rw-r--r-- 1 root root 5591053 2009-05-26 all_locales-1.4.18-20090526.tar.gz
-rw-r--r-- 1 root root 2175238 2012-03-21 courier-authlib-0.62.4.tar.bz2
-rw-r--r-- 1 root root 137736 2012-03-21 DBD-mysql-4.020.tar.gz
-rw-r--r-- 1 root root 576803 2012-03-21 DBI-1.616.tar.gz
-rw-r--r-- 1 root root 2314155 2012-03-21 dovecot-1.1.4.tar.gz
-rw-r--r-- 1 root root 685284 2012-03-21 extmail-1.0.5.tar.gz
-rw-r--r-- 1 root root 561942 2012-03-21 extman-0.2.5.tar.gz
-rw-r--r-- 1 root root 22800 2012-03-21 File-Tail-0.99.3.tar.gz
-rw-r--r-- 1 root root 14420771 2012-03-21 fp-Linux-i686-ws.tar.gz
-rw-r--r-- 1 root root 260989 2012-03-21 GD-2.46.tar.gz
-rw-r--r-- 1 root root 5322082 2011-05-22 httpd-2.2.19.tar.bz2
-rw-r--r-- 1 root root 5864320 2012-03-21 MailScanner-4.84.3-1.rpm.tar.gz
-rw-r--r-- 1 root root 1208182 2012-03-21 Mail-SpamAssassin-3.3.2.tar.gz
-rw-r--r-- 1 root root 22231820 2012-04-08 mysql-5.0.87.tar.gz
-rw-r--r-- 1 root root 11144328 2011-08-18 php-5.3.7.tar.bz2
-rw-r--r-- 1 root root 3323255 2012-03-21 postfix-2.6.2.tar.gz
-rw-r--r-- 1 root root 12661 2012-03-21 postfix-2.6.2-vda-ng.patch.gz
-rw-r--r-- 1 root root 474709 2012-03-21 rrdtool-1.2.23-3.el5.i386.rpm
-rw-r--r-- 1 root root 34075 2012-03-21 rrdtool-perl-1.2.23-3.el5.i386.rpm
-rw-r--r-- 1 root root 664076 12-21 10:31 squirrelmail-webmail-1.4.22.tar.gz
-rw-r--r-- 1 root root 13738 2012-03-21 Unix-Syslog-1.1.tar.gz

二 lamp环境搭建
安装apache
解压
[root@mail file]# tar -zxvf httpd-2.2.9.tar.gz -C /usr/local/src
配置
[root@mail httpd-2.2.9]# cd /usr/local/apache2/bin/
[root@mail httpd-2.2.9]# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
编译
[root@mail httpd-2.2.9]# make && make install

启动service httpd start 提示服务未识别
解决方法
可以直接使用[root@mail bin]# /usr/local/src/httpd-2.2.9/httpd 启动
或者将apache 加入启动服务,可以更加方便的管理apache的启动与停止
方法如下

[root@mail httpd-2.2.9]# cd /usr/local/apache2/bin/
[root@mail bin]# vim apachectl
加入
1 #!/bin/sh
2 #chkconfig:35 85 15
3 #description:Apache is a World Wide Web Server

[root@mail bin]# cp apachectl /etc/init.d/apache
[root@mail bin]# chkconfig --add apache
[root@mail bin]# chkconfig apache on
[root@mail bin]# service apache on

[root@mail bin]# service apache start
httpd: Could not reliably determine the server's fully qualified domain name, using mail.moyang.cn for ServerName
解决方法
[root@mail bin]# vim /usr/local/apache2/conf/httpd.conf
97 ServerName mail.moyang.cn:80
测试




安装mysql
安装之前将系统自有的mysql卸载,否则会出错。
[root@mail php-5.3.7]# useradd -M -s /sbin/nologin mysql

[root@mail file]# tar -zxvf mysql-5.0.87.tar.gz -C /usr/local/src/
[root@mail file]# cd /usr/local/src/mysql-5.0.87/
[root@mail mysql-5.0.87]# ./configure --prefix=/usr/local/mysql
[root@mail mysql-5.0.87]# make && make install
配置mysql
[root@mail mysql-5.0.87]# cp support-files/my-medium.cnf /etc/my.cnf
[root@mail mysql-5.0.87]# /usr/local/mysql/bin/mysql_install_db --user=mysql
[root@mail mysql-5.0.87]# chown -R root:mysql /usr/local/mysql
[root@mail mysql-5.0.87]# chown -R mysql /usr/local/mysql/var
[root@mail mysql-5.0.87]# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
[root@mail mysql-5.0.87]# ldconfig
[root@mail mysql-5.0.87]# /usr/local/mysql/bin/mysqld_safe --user=mysql &

将mysql加入service
[root@mail mysql-5.0.87]# cp support-files/mysql.server /etc/init.d/mysqld
[root@mail mysql-5.0.87]# chmod +x /etc/init.d/mysqld
[root@mail mysql-5.0.87]# chkconfig --add mysqld
[root@mail mysql-5.0.87]# chkconfig mysqld on

[root@mail mysql-5.0.87]# echo “PATH=$PATH:/usr/local/mysql/bin” >> /etc/profile
[root@mail mysql-5.0.87]# export PATH=$PATH:/usr/local/mysql/bin

测试
[root@mail mysql-5.0.87]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.87-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

[root@mail ~]# vim /usr/local/apache2/htdocs/testdb.php
<?php
$link=mysql_connect('localhost' , 'test' ,'');
If (!link) echo "fail" ;
else echo "success" ;
mysql_close();
?>
测试mysql





安装php
[root@mail file]# tar jxf php-5.3.7.tar.bz2 -C /usr/local/src/
[root@mail file]# cd /usr/local/src/php-5.3.7/
[root@mail php-5.3.7]# ./configure --prefix=/usr/local/php5 --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php5
[root@mail php-5.3.7]# make
[root@mail php-5.3.7]# make test
[root@mail php-5.3.7]# make install

[root@mail php-5.3.7]# cp php.ini-production /usr/local/php5/php.ini
54 ADDType application/x-httpd-php.php
167 <IfModule dir_module>
168 DirectoryIndex index.php index.html
169 </IfModule>

[root@mail php-5.3.7]# vim /usr/local/apache2/htdocs/index .php
1 <?php
2 phpinfo();
3 ?>
测试 测试机需要设置dns参数





三 安装配置postfix
首先关闭sendmail
[root@mail ~]# service sendmail stop
[root@mail ~]# chkconfig sendmail off

[root@mail ~]# groupadd -g 1200 postdrop
[root@mail ~]# groupadd -g 1000 postfix
[root@mail ~]# useradd -M -u 1000 -g postfix -G postdrop -s /sbin/nologin postfix
[root@mail ~]# cd file/
[root@mail file]# tar zxvf postfix-2.6.2.tar.gz –C /usr/src/
[root@mail file]# cp postfix-2.6.2-vda-ng.patch.gz /usr/src/
[root@mail file]# cd /usr/src/
[root@mail src]# gunzip postfix-2.6.2-vda-ng.patch.gz
[root@mail src]# cd postfix-2.6.2
[root@mail postfix-2.6.2]# patch -p1 <../postfix-2.6.2-vda-ng.patch
[root@mail postfix-2.6.2]# yum -y install db*-devel cyrus-sasl-devel
[root@mail postfix-2.6.2]#
make makefiles
‘CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH-DUSE_CYRUS_SASL -I/usr/include/sasl’ ‘AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2’

[root@mail postfix-2.6.2]# vim /etc/postfix/main.cf
75 myhostname = mail.moyang.cn
83 mydomain = moyang.cn
99 myorigin = $mydomain
113 inet_interfaces = all
160 mydestination = $myhostname, $mydomain

[root@mail postfix-2.6.2]# postfix start
postfix/postfix-script: starting the Postfix mail system
[root@mail postfix-2.6.2]# echo "/usr/sbin/postfix start" >> /etc/rc.local

测试
[root@mail postfix-2.6.2]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.moyang.cn ESMTP Postfix
helo localhost
250 mail.moyang.cn
mail from:user1@moyang.cn
250 2.1.0 Ok
rcpt to:user2@moyang.cn
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject:test
this is a test mail.
.
250 2.0.0 Ok: queued as 77B431D04FC
quit
221 2.0.0 Bye

使用user2登录
[user2@mail ~]$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/user2": 1 message 1 new
>N 1 user1@moyang.cn Wed Mar 21 05:52 15/504 "test"
& 1
Message 1:
From user1@moyang.cn Wed Mar 21 05:52:39 2012
X-Original-To: user2@moyang.cn
Delivered-To: user2@moyang.cn
Subject: test
Date: Wed, 21 Mar 2012 05:51:41 +0800 (CST)
From: user1@moyang.cn
To: undisclosed-recipients:;

this is a test mail.

&

四 dovecot安装配置
[root@mail ~]# useradd -M -s /sbin/nologin dovecot
[root@mail ~]#cd file/
[root@mail file]# tar -zxvf dovecot-1.1.4.tar.gz -C /usr/src/
[root@mail file]# cd /usr/src/dovecot-1.1.4/
[root@mail dovecot-1.1.4]# yum -y install pam-devel
[root@mail dovecot-1.1.4]# ./configure --sysconfdir=/etc --with-mysql
[root@mail dovecot-1.1.4]# make && make install
[root@mail dovecot-1.1.4]# cp /etc/dovecot-example.conf /etc/dovecot.conf
[root@mail dovecot-1.1.4]# vim /etc/dovecot.conf
23 protocols = pop3 imap
47 disable_plaintext_auth = no
87 ssl_disable = yes
214 mail_location = maildir:~/Maildir
[root@mail dovecot-1.1.4]# vim /etc/pam.d/dovecot
1 auth required pam_nologin.so
2 auth include system-auth
3 account include system-auth
4 session include system-auth

[root@mail dovecot-1.1.4]# /usr/local/sbin/dovecot -c /etc/dovecot.conf
[root@mail dovecot-1.1.4]# echo "/usr/local/sbin/dovecot -c /etc/dovecot.conf" >> /etc/rc.local

测试
[root@mail dovecot-1.1.4]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Dovecot ready.
user user2
+OK
pass 123456
+OK Logged in.
list
+OK 4 messages:
1 473
2 476
3 2342
4 467
.
retr 4
+OK 467 octets
Return-Path: <user1@moyang.cn>
X-Original-To: user2@moyang.cn
Delivered-To: user2@moyang.cn
Received: from localhost (localhost.localdomain [127.0.0.1])
by mail.moyang.cn (Postfix) with SMTP id 77B431D04FC
for <user2@moyang.cn>; Wed, 21 Mar 2012 05:36:27 +0800 (CST)
Subject:test
Message-Id: <20120320213645.77B431D04FC@mail.moyang.cn>
Date: Wed, 21 Mar 2012 05:36:27 +0800 (CST)
From: user1@moyang.cn
To: undisclosed-recipients:;

this is a testmail.
.
quit
+OK Logging out.
Connection closed by foreign host.

五 squirrelmail安装配置
[root@mail file]# tar -zxvf squirrelmail-webmail-1.4.22.tar.gz -C /usr/local/apache2/htdocs/
[root@mail file]# cd /usr/local/apache2/htdocs/
[root@mail htdocs]# mv squirrelmail-webmail-1.4.22/ webmail
[root@mail htdocs]# cd webmail/
[root@mail webmail]# mkdir -p attach data
[root@mail webmail]# chown -R daemon:daemon attach/ data/
[root@mail webmail]# chmod 730 attach/
[root@mail webmail]# cp config/config_default.php config/config.php
118 $domain = 'crazylinux.cn';
231 $imap_server_type = 'dovecot';
499 $data_dir = '/usr/local/apache2/htdocs/webmail/data/';
517 $attachment_dir = '/usr/local/apache2/htdocs/webmail/attach/';
1012 $squirrelmail_default_language = 'zh_CN';
1027 $default_charset = 'zh_CN.UTF-8';
测试





汉化
[root@mail file]# tar -zxvf all_locales-1.4.18-20090526.tar.gz -C aaa
[root@mail file]# mkdir aaa
[root@mail file]# cd aaa/
[root@mail aaa]# ./install
Please enter path to your squirrelmail installation: /usr/local/apache2/htdocs/webmail/
之后一路确定即可




六 配置postfix支持mysql虚拟用户
[root@mail docs]# vim /etc/postfix/main.cf
virtual_mailbox_base = /mailbox
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
167 #mydestination = $myhostname, $mydomain

[root@mail docs]# cp mysql_virtual_* /etc/postfix/

为虚拟用户设置SMTP发信认证
[root@mail file]# tar -jxvf courier-authlib-0.62.4.tar.bz2 -C /usr/local/src/
[root@mail file]# cd /usr/local/src/courier-authlib-0.62.4/
[root@mail courier-authlib-0.62.4]# ./configure --prefix=/usr/local/courier-authlib --without-stdheaderdir --with-authmysql --with-redhat --with-mysql-libs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql
[root@mail courier-authlib-0.62.4]# make && make install

[root@mail courier-authlib-0.62.4]# vim /etc/ld.so.conf
/usr/local/courier-authlib/lib/courier-authlib
[root@mail courier-authlib-0.62.4]# ldconfig
[root@mail courier-authlib-0.62.4]# cd /usr/local/courier-authlib/etc/authlib/
[root@mail authlib]# cp authdaemonrc authdaemonrc.bak
[root@mail authlib]# vim authdaemonrc
27 authmodulelist="anthmysql"
34 authmodulelistorig="authmysql"
[root@mail authlib]# chmod -R 755 /usr/local/courier-authlib/var/spool/authdaemon/

[root@mail ~]# cd /usr/local/courier-authlib/etc/authlib/
[root@mail authlib]# cp authmysqlrc authmysqlrc.bak
[root@mail authlib]# vim authmysqlrc
26 MYSQL_SERVER localhost
27 MYSQL_USERNAME extmail
28 MYSQL_PASSWORD extmail
49 MYSQL_SOCKET /tmp/mysql.sock
68 MYSQL_DATABASE exmail
83 MYSQL_USER_TABLE mailbox
91 MYSQL_CRYPT_PWFIELD passwd
112 MYSQL_UID_FIELD uidnumber
118 MYSQL_GID_FIELD gidnumber
127 MYSQL_LOGIN_FIELD username
132 MYSQL_HOME_FIELD concat('/mialbox/',homedir)
138 MYSQL_NAME_FIELD name
149 MYSQL_MAILDIR_FIELD concat('/mailbox/',homedir)

[root@mail courier-authlib]# cd /usr/local/src/courier-authlib-0.62.4/
[root@mail courier-authlib-0.62.4]# cp courier-authlib.sysvinit /etc/init.d/courier-authlib
[root@mail courier-authlib-0.62.4]# chmod 744 /etc/rc.d/init.d/courier-authlib
[root@mail courier-authlib-0.62.4]# chkconfig --level 35 courier-authlib on
[root@mail courier-authlib-0.62.4]# service courier-authlib start
[root@mail courier-authlib-0.62.4]# vim /usr/lib/sasl2/smtpd.conf
1 pwcheck_method:authdaemond
2 authdaemond_path: /usr/local/courier-authlib/var/spool/authdaemon/socket

[root@mail ~]# vim /etc/dovecot.conf
214 mail_location = maildir:/mailbox/%d/%d/%n/Maildir
790 auth default {
795 mechanisms = plain
899 passdb sql {
900 # Path for SQL configuration file, see doc/dovecot-sql-example.conf
901 args =/etc/dovecot-mysql.conf
902 }
962 userdb sql {
963 # Path for SQL configuration file, see doc/dovecot-sql-example.conf
964 args =/etc/dovecot-mysql.conf
965 }

[root@mail ~]# vim /etc/dovecot-mysql.conf
加入以下内容
driver = mysql
connect = host=localhost dbname=extmail user=extmail password=extmail
default_pass_scheme = CRYPT
password_query = SELECT username AS user,password AS password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir,uidnumber AS uid,gidnumber AS gid FROM mailbox WHERE username = '%u'

[root@mail ~]# mkdir -p /mailbox/extmail.org/postmaster/Maildir/
[root@mail ~]# cd /mailbox/extmail.org/postmaster/Maildir/
[root@mail Maildir]# chown -R postfix:postfix /mailbox/
[root@mail Maildir]# pkill dovecot
[root@mail Maildir]# dovecot

/usr/local/courier-authlib/sbin/authtest -s login postmaster@extmail.org extmail
我的验证没有通过,不过没有关系虚拟账户还是可以建立的。

七 extman安装配置
[root@mail file]# tar -zxf GD-2.46.tar.gz -C /usr/local/src/
[root@mail file]# tar File-Tail-0.99.3.tar.gz -C /usr/local/src/
[root@mail file]# rpm -ivh rrdtool-1.2.23-3.el5.i386.rpm
[root@mail file]# rpm -ivh rrdtool-perl-1.2.23-3.el5.i386.rpm
[root@mail file]# cd /usr/local/src/GD-2.46/
[root@mail GD-2.46]# perl Makefile.PL
[root@mail GD-2.46]# make && make install
[root@mail GD-2.46]# cd ../File-Tail-0.99.3/
[root@mail File-Tail-0.99.3]# perl Makefile.PL
[root@mail File-Tail-0.99.3]# make && make install
[root@mail file]# tar -zxf extman-0.2.5.tar.gz -C /usr/local/apache2/htdocs/
[root@mail file]# cd /usr/local/apache2/htdocs/
[root@mail htdocs]# mv extman-0.2.5 extman
[root@mail htdocs]# cd extman
[root@mail extman]# chown -R postfix:postfix cgi
[root@mail extman]# mkdir /tmp/extman
[root@mail extman]#
[root@mail extman]#
[root@mail extman]# chown -R postfix:postfix /tmp/extman
1 # sys_config, the config file and webman programe root
2 SYS_CONFIG = /usr/loacl/apache2/htdocs/extman
3
4 # sys_langdir, the i18n dir
5 SYS_LANGDIR = /usr/local/apache2/htdocs/extman/lang
6
7 # sys_templdir, the template dir
8 SYS_TEMPLDIR = /usr/loacl/apache2/htdocs/extman/html
9
10 # maildir_base, the base dir of user maildir, use absolute path
11 # if not set.
12 SYS_MAILDIR_BASE = /mail/box 127 SYS_MYSQL_USER = webman
128 SYS_MYSQL_PASS = webman
129 SYS_MYSQL_DB = extmail
130 SYS_MYSQL_HOST = localhost
131 SYS_MYSQL_SOCKET = /tmp/mysql.sock

extmail部署
[root@mail file]# tar -zxvf Unix-Syslog-1.1.tar.gz -C /usr/src/
[root@mail file]# tar -zxvf DBI-1.616.tar.gz -C /usr/src/
[root@mail file]# tar -zxvf DBD-mysql-4.020.tar.gz -C /usr/src/
[root@mail file]# tar -zxvf extmail-1.0.5.tar.gz -C /usr/local/apache2/htdocs/
[root@mail Unix-Syslog-1.1]# perl Makefile.PL
[root@mail Unix-Syslog-1.1]# make && make install
[root@mail Unix-Syslog-1.1]# cd ../DBI-1.616/
[root@mail DBI-1.616]# perl Makefile.PL
[root@mail DBI-1.616]# make && make install
[root@mail DBI-1.616]# cd ../DBD-mysql-4.020/
[root@mail DBD-mysql-4.020]# perl Makefile.PL
[root@mail DBD-mysql-4.020]# make && make install
[root@mail DBD-mysql-4.020]# cd /usr/local/apache2/htdocs/
[root@mail htdocs]# mv extmail-1.0.5/ extmail
[root@mail htdocs]# cd extmail/
[root@mail extmail]# chown -R postfix:postfix cgi
[root@mail extmail]# cp webmail.cf.default webmail.cf
[root@mail extmail]# vim webmail.cf

2 SYS_CONFIG = /usr/local/apache2/htdocs/extmail/
5 SYS_LANGDIR = /usr/local/apache2/htdocs/extmail/lang
8 SYS_TEMPLDIR = /usr/local/apache2/htdocs/extmail/html
112 SYS_MAILDIR_BASE = /mailbox
124 SYS_MYSQL_USER = extmail
125 SYS_MYSQL_PASS = extmail
126 SYS_MYSQL_DB = extmail
127 SYS_MYSQL_HOST = localhost
128 SYS_MYSQL_SOCKET = /temp/mysql.sock

[root@mail extmail]# vim /usr/local/apache2/conf/httpd.conf
390 Include conf/extra/httpd-vhosts.conf

[root@mail extmail]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
19 NameVirtualHost *:80
27 <VirtualHost *:80>
28 ServerName mail.wisefund.com
29 DocumentRoot /usr/local/apache2/htdocs/extmail/html/
30 ScriptAlias /extmail/cgi/ "/usr/local/apache2/htdocs/extmail/cgi/"
31 Alias /extmail "/usr/local/apache2/htdocs/extmail/html/"
32 </VirtualHost>
只要加入以上内容即可,其他内容可以删掉。
测试
[root@mail extmail]# service apache restart




没搞完待续
本文出自 “默扬” 博客,请务必保留此出处http://moyang.blog.51cto.com/4456258/834494
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: