First, increase fcgi support
Description: To gain superior Web performance, overcoming CGI's inability to cope with a large number of access and inefficiency deficiencies
1. Install Apache mod_fastcgi module
[[email protected] ~]# yum install-y httpd-devel[[email protected] ~]# cd/usr/local/src[[email protected] src]# wget htt P://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz[[email protected] src]# tar zxvf mod_fastcgi-2.4.6.tar.gz[[email Protected] src]# CD Mod_fastcgi-2.4.6[[email protected] mod_fastcgi-2.4.6]# CP makefile.ap2 makefile# Search ~httpd/ Build directory path, assign value to Top_dir for installation [[email protected] mod_fastcgi-2.4.6]# Find/-name "build"-type D[[email protected] Mod_ fastcgi-2.4.6]# make Top_dir=/usr/lib64/httpd/install
2. See if the module is generated
[Email protected] mod_fastcgi-2.4.6]# ls/etc/httpd/modules/mod_fastcgi.so/etc/httpd/modules/mod_fastcgi.so
3. Install the PERL-FCGI module required by Extmail
[email protected] mod_fastcgi-2.4.6]# Yum install perl-fcgi
4. Configure the virtual host file
[Email protected] mod_fastcgi-2.4.6]# vi/etc/httpd/conf.d/extmail.confloadmodule fastcgi_module modules/mod_ fastcgi.so <ifmodule mod_fastcgi.c> fastcgiexternalserver/usr/bin/dispatch.fcgi-host 127.0.0.1:8888-idle-tim Eout </Ifmodule> <virtualhost *:80> #ScriptAlias/extmail/cgi//var/www/extsuite/extmail/cgi/alias/ extmail/cgi//usr/bin/dispatch.fcgi/scriptalias/extman/cgi//var/www/extsuite/extman/cgi/alias/extman/cgi//usr/ bin/dispatch.fcgi/<location "/extman/cgi" > SetHandler fastcgi-script </location></virtualhost& Gt
Note: The above/usr/bin/dispatch.fcgi does not exist, but must be written as above.
5. Start
To modify the startup script:
[Email protected] mod_fastcgi-2.4.6]# Vi/var/www/extsuite/extmail/dispatch-initsu_uid=vmailsu_gid=vmail
To start a process:
[[email protected] mod_fastcgi-2.4.6]# /var/www/extsuite/extmail/dispatch-init start[[ email protected] mod_fastcgi-2.4.6]# echo "/var/www/extsuite/extmail/dispatch-init Start " >> /etc/rc.d/rc.local[[email protected] mod_fastcgi-2.4.6]# service httpd restart[[email protected] mod_fastcgi-2.4.6]# ps aux|grep dispatch.fcgivmail 18737 0.0 0.5 139048 5588 ? SNs 11:00 0:00 dispatch.fcgi (Master) vmail 18738 0.0 0.5 139048 5432 ? SN 11:00 0:00 dispatch.fcgi (Idle) vmail 18739 0.0 0.5 139048 5432 ? sn 11:00 0:00 dispatch.fcgi (idle) root 18762 0.0 0.0 103256 864 pts/2 s+ 11:02 0:00 grep dispatch.fcgi [[ email protected] mod_fastcgi-2.4.6]# netstat -tnlp|grep 8888tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 18737/dispatch.fcgi
Note: fcgi is not enabled for Extman because an error occurs when enabled, as described in:
Http://www.extmail.org/forum/thread-12859-1-1.html
Second, increase the SSL login
1. Installing the SSL module
[email protected] ~]# Yum install mod_ssl
2. Create a key, certificate
(1) View local key and certificate location
[Email protected] ~]# vi/etc/httpd/conf.d/ssl.confsslcertificatefile/etc/pki/tls/certs/ Localhost.crtsslcertificatekeyfile/etc/pki/tls/private/localhost.key
(2) Rebuilding the local key
[[email protected] ~]# cd/etc/pki/tls/private[[email protected] private]# rm-f Localhost.key[[email protected] private] # OpenSSL Genrsa 1024x768 > Localhost.key
(3) Rebuilding local certificates
[[email protected] private]# cd .. /certs[[email protected] certs]# rm -rf localhost.crt[[email protected] CERTS]#&NBSP;OPENSSL&NBSP;REQ&NBSP;-NEW&NBSP;-X509&NBSP;-DAYS&NBSP;365&NBSP;-KEY&NBSP, .... /private/localhost.key -out localhost.crtyou are about to be asked to enter information that will be incorporatedinto your certificate request. what you are about to enter is what is called a Distinguished name or a dn. there are quite a few fields but you can leave some blankfor some fields there will be a default value,if you enter '. ', the field will be left blank.-----country name (2 letter code) [xx]:cnstate or&nbsP province name (Full name) []:zhejiangLocality Name (eg, city) [default City]:hangzhouOrganization Name (Eg, company) [default company ltd]: yourmail organizational unit name (eg, section) []:itCommon Name (Eg, your name or your server s hostname) []:email address []:
3. Configure the Virtual host
Description: Move the extmail.conf content under CONF.D to ssl.conf and use SSL port 443 for Web Connection.
[[email protected] certs]# cd /etc/httpd/conf.d[[email protected] conf.d]# mv extmail.conf extmail.conf.bak[[email protected] conf.d]# vi Ssl.confloadmodule fastcgi_module modules/mod_fastcgi.so<ifmodule mod_fastcgi.c> fastcgiexternalserver /usr/bin/dispatch.fcgi -host 127.0.0.1:8888 -idle-timeout 240 </Ifmodule> #在下行之上添加以上内容 <VirtualHost _default_:443> #在上行之下添加以下内容ServerName mail.yourmail.com:443 documentroot /var/www/extsuite/extmail/html/#ScriptAlias /extmail/cgi/ /var/www/extsuite/extmail/cgi/Alias /extmail/cgi/ /usr/bin/dispatch.fcgi/ < location "/extmail/cgi" > sethandler fastcgi-script </location>alias /extmail /var/www/extsuite/extmail/html/scriptalias /extman/cgi/ /var/www/extsuite/extman /cgi/alias /extman /var/www/extsuite/extman/html/suexEcusergroup vmail vmail
Comment out the root directory:
Otherwise, the file does not exist is displayed in the error log:/var/www/html/favicon.ico
The D icon (dspam) is displayed in the page tab.
[Email protected] conf.d]# VI.. /conf/httpd.conf#documentroot "/var/www/html"
4. Restart Service
[[Email protected] ~]# service httpd restart[[email protected] ~]# iptables-i input-p tcp--dport 443-j accept[[email p Rotected] ~]# service iptables save[[email protected] ~]# netstat-tnlp|grep 443tcp 0 0::: 443 :::* LISTEN 19691/httpd
5. Visit the page
http://the page is inaccessible.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/6C/wKiom1SaESnTWSyMAAHbd4NRKMQ580.jpg "style=" float: none; "title=" Qq20141211154135.png "alt=" Wkiom1saesntwsymaahbd4nrkmq580.jpg "/>
https://page will prompt the certificate is unsafe, no tube, click Continue to browse:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/6A/wKioL1SaEdSD4bqdAAJUS-ALUjQ900.jpg "style=" float: none; "title=" Qq20141211154219.png "alt=" Wkiol1saedsd4bqdaajus-alujq900.jpg "/>
Extmail successfully supported SSL, here the label shows the Dspam icon, because I did not delete it as a result.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/57/6C/wKiom1SaESnwPryoAALDdglWIEc919.jpg "style=" float: none; "title=" Qq20141211154331.png "alt=" Wkiom1saesnwpryoaalddglwiec919.jpg "/>
Dspam page can also use SSL: 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/57/6C/ Wkiom1saeletpxqaaavnn4rnoq0188.jpg "title=" Qq20141224090925.png "style=" Float:none; "alt=" Wkiom1saeletpxqaaavnn4rnoq0188.jpg "/>
The original page of Dspam cannot see the historical data:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/57/6A/wKioL1SaEwHC5ZYfAAImVBmpRLE043.jpg "style=" float: none; "title=" Qq20141224090844.png "alt=" Wkiol1saewhc5zyfaaimvbmprle043.jpg "/>
This article is from the "Moon Ching Xing Fei" blog, please be sure to keep this source http://ywzhou.blog.51cto.com/2785388/1594601
Postfix mailbox (11): Webmail support FCGI and SSL