Three. Mail Empty shell Apache

Source: Internet
Author: User
Tags random seed

A. # # # #mail empty Shell Message # # # #
Configuration file (maillinux.linux.com)
---------------------------------
Zone "localhost" in {
Type master;
File "named.localhost";
Allow-update {none;};
23};
24
Zone "westos.org" in {
Type master;
File "westos.org.zone";
Allow-update {none;};
29};
---------------------------------
Cp-p Named.localhost Westos.org.zone
Vim/etc/named/westos.org.zone
--------------------------------------------------------
1 $TTL 1D
2 @ in SOA dns.westos.com. Root.westos.org. (
3 0; Serial
4 1D; Refresh
5 1H; Retry
6 1W; Expire
7 3H); Minimum
8 NS Dns.westos.org.
9 DNS A 172.25.254.100
Ten Westos.org. MX 1 172.25.254.100.
--------------------------------------------------------
Rm-fr/etc/postfix/main.cf
Yum Reinstall postfix.x86_64-y
Vim/etc/postfix/main.cf
----------------------------------------------
Myhostname = maillinux.linux.com
MyDomain = linux.com
98 Myorigin = westos.org
113 Inet_interfaces = All
#inet_interfaces = localhost
164 Mydestination =
313 relayhost = 172.25.254.100 # #间接发送 IP for accept address
Local_transport = error:local Delivery disabled
----------------------------------------------
Systemctl Restart Postfix.service
Systemctl Start named


In (mailwestos.westos.com)
Vim/etc/postfix/main.cf
Mynetworks = 172.25.254.0/24
Systemctl Restart Postfix.service

Www.extmail.org Mail system
Lamp=linux Apache MySQL php lnmp=linux nginx mysql PHP




Two. Curl View site Information
Curl-i www.baidu.com
Yum Install Nmap famous hacker software (intrusion System)

Server:tengine


Three. Apache # # # # #
1.httpd
Yum Install Httpd-y
cd/var/www/html/
Vim index.html
Page 123
RPM-QC httpd
/etc/httpd/conf.d/autoindex.conf
/etc/httpd/conf.d/userdir.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf.modules.d/00-base.conf
/etc/httpd/conf.modules.d/00-dav.conf
/etc/httpd/conf.modules.d/00-lua.conf
/etc/httpd/conf.modules.d/00-mpm.conf
/etc/httpd/conf.modules.d/00-proxy.conf
/etc/httpd/conf.modules.d/00-systemd.conf
/etc/httpd/conf.modules.d/01-cgi.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/logrotate.d/httpd
/etc/sysconfig/htcacheclean
/etc/sysconfig/httpd

Vim/etc/httpd/conf/httpd.conf
----------------------------------
163 <ifmodule dir_module>
164 DirectoryIndex index.html
165 </IfModule>
----------------------------------
# #不用修改
Test 172.25.254.100/index.html with Firefox



# # #修改firefox的默认目录 # #
[email protected] html]# Yum Install httpd-manual-y
[email protected] html]# Ls-zd. # #表示列出文件的安全信息内容
Drwxr-xr-x. Root root system_u:object_r:httpd_sys_content_t:s0.
[email protected] html]# mkdir/www/westos-p
[email protected] html]# semanage fcontext-a-t httpd_sys_content_t '/www/westos (/.*)? '
[email protected] html]# restorecon-rvvf/www/
Restorecon reset/www Context Unconfined_u:object_r:default_t:s0->system_u:object_r:default_t:s0
Restorecon Reset/www/westos Context Unconfined_u:object_r:default_t:s0->system_u:object_r:httpd_sys_content_t: S0
[email protected] html]# cd/www/westos/
[[email protected] westos]# ls
[email protected] westos]# Vim index.html
------------------
Website content ...
------------------
[email protected] westos]# ls-z
-rw-r--r--. Root root Unconfined_u:object_r:httpd_sys_content_t:s0 index.html
[email protected] westos]# semanage fcontext-a-t httpd_sys_content_t '/www/westos (/.*)? '

Vim/etc/httpd/conf/httpd.conf
--------------------------------
119 #DocumentRoot "/var/www/html"
DocumentRoot "/www/westos"
121 <directory "/www/westos" >
122 Require all granted
123 </Directory>
Listen # #监听端口 defaults to 80
-------------------------------
Systemctl Restart httpd
Systemctl Reload httpd


# # # #网站登陆ip限制 # #
Vim/etc/httpd/conf/httpd.conf
------------------------------
119 #DocumentRoot "/var/www/html"
DocumentRoot "/www/westos"
121 <directory "/www/westos" >
122 Require all granted
123 Order Allow,deny # #注意读取的顺序
124 Deny from all
172.25.254.250 172.25.254.1
---------------------------------------------


# # # #用户认证登录 # #
cd/etc/httpd/
Ls
Conf CONF.D CONF.MODULES.D logs modules run

HTPASSWD-CM htpasswdfile Westos # #创建登录web的用户 First add "-c"
Htpasswd-m htpasswdfile Admin # #创建其他登录用户 do not add "-c", otherwise overwrite the user created for the first time

Ls
conf conf.d conf.modules.d htpasswdfile logs modules run
Cat/etc/httpd/htpasswdfile
Westos: $APR 1$n2th2dys$kf7nfjh/opn.lt.axbc4d.
Admin: $APR 1$vkky4n9e$wducx1f.fpofomvq6voph.

Vim/etc/httpd/conf/httpd.conf
-----------------------------------------------------------
DocumentRoot "/www/westos"
121 <directory "/www/westos" >
122 #require All granted
123 AllowOverride All
124 Authuserfile/etc/httpd/htpasswdfile
AuthName "please input username and password"
126 AuthType Basic
127 Require Valid-user
</Directory>
-----------------------------------------------------------

Vim/etc/hosts
6 172.25.254.100 mailwestos.westos.com # #域名解析
Mkdir/var/www/virtual/news.westos.com/html-p
Mkdir/var/www/virtual/music.westos.com/html-p
Modify the/etc/hosts on the test host
172.25.254.100 www.westos.com westos.com news.westos.com music.westos.com

Vim/etc/httpd/conf.d/default
1 <virtualhost _default_:80>
2 documentroot//var/www/html
3 Customlog "logs/default.log" combined
4 </Virtualhost>
5 <directory "/var/www/html" >
6 Require All granted
7 </Directory>

Vim/etc/httpd/conf.d/music.conf
1 <virtualhost *:80>
2 Servername music.westos.com
3 documentroot/var/www/virtual/music.westos.com/html
4 Customlog "logs/music.log" combined
5 </Virtualhost>
6 <directory "/var/www/virtual/music.westos.com/html" >
7 Require All granted
8 </Directory>

Vim/etc/httpd/conf.d/news.conf
Ditto


2. Configure HTTPS
Yum Install Mod_ssl-y
Yum Search util
Yum Install Crypto-utils
Genkey www.westos.com
Enter option mode

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/8B/4C/wKioL1hJQ-ywsLUxAAMlAVKc9lA092.png-wh_500x0-wm_3 -wmp_4-s_3826059503.png "title=" 2016-12-08 18:01:43 screenshot. png "alt=" wkiol1hjq-ywsluxaamlavkc9la092.png-wh_50 "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8B/50/wKiom1hJQ_nhK7h_AAM0FNY2KsY322.png-wh_500x0-wm_3 -wmp_4-s_394881705.png "title=" 2016-12-08 17:38:11 screenshot. png "alt=" wkiom1hjq_nhk7h_aam0fny2ksy322.png-wh_50 "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/50/wKiom1hJRAnydZOIAAOPuqfY1Pw232.png-wh_500x0-wm_3 -wmp_4-s_3747888629.png "title=" 2016-12-08 17:38:04 screenshot. png "alt=" wkiom1hjranydzoiaaopuqfy1pw232.png-wh_50 "/> 650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8B/50/wKiom1hJRFOTmwT6AAF9tdKkGZQ128.png-wh_500x0-wm_3 -wmp_4-s_958929110.png "title=" 2016-12-08 17:37:58 screenshot. png "alt=" wkiom1hjrfotmwt6aaf9tdkkgzq128.png-wh_50 "/>


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/8B/50/wKiom1hJRGzxNzvgAAL9iIzOxWc255.png-wh_500x0-wm_3 -wmp_4-s_2238130803.png "title=" 2016-12-08 17:37:51 screenshot. png "alt=" wkiom1hjrgzxnzvgaal9iizoxwc255.png-wh_50 "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8B/50/wKiom1hJRJnAlRCOAALJeD7l7cc917.png-wh_500x0-wm_3 -wmp_4-s_3572793806.png "title=" 2016-12-08 17:38:36 screenshot. png "alt=" wkiom1hjrjnalrcoaaljed7l7cc917.png-wh_50 "/>


Final appearance:
-------------------------------------------------------------------------------
/usr/bin/keyutil-c makecert-g 1024-s "cn=www.westos.com, ou=linux, o=westos, l=xi ' an, st=shannxi, C=CN"-v 1-a-z/etc /pki/tls/.rand.4813-o/etc/pki/tls/certs/www.westos.com.crt-k/etc/pki/tls/private/www.westos.com.key
Cmdstr:makecert

Cmd_createnewcert
Command:makecert
KeySize = 1024x768 Bits
Subject = cn=www.westos.com, ou=linux, o=westos, l=xi ' an, st=shannxi, C=CN
Valid for 1 months
Random seed from/etc/pki/tls/.rand.4813
Output would be written TO/ETC/PKI/TLS/CERTS/WWW.WESTOS.COM.CRT # #证书
Output key written To/etc/pki/tls/private/www.westos.com.key # #公钥


Generating Key. This could take a few moments ...

Made a key
Opened Tmprequest for writing
/usr/bin/keyutil Copying The Cert pointer
Created a certificate
Wrote 882 bytes of encoded data To/etc/pki/tls/private/www.westos.com.key
Wrote the key to:
/etc/pki/tls/private/www.westos.com.key
------------------------------------------------------------------------------

Vim/etc/httpd/conf.d/ssl.conf
------------------------------------------------------------------------------
SSLCERTIFICATEFILE/ETC/PKI/TLS/CERTS/WWW.WESTOS.COM.CRT # #证书
101
102 # Server Private Key:
103 # If The key is not a combined with the certificate
104 # directive to point at the key File. Keep in mind that if
# you ' ve both a RSA and a DSA private key can configure
106 # Both in parallel (to also allow the use of DSA ciphers, etc.)
107 Sslcertificatekeyfile/etc/pki/tls/private/www.westos.com.key # #公钥
------------------------------------------------------------------

This article from "12100661" blog, declined reprint!

Three. Mail Empty shell Apache

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.