三.mail空壳 apache

一.####mail 空壳邮件####
配置文件 (maillinux.linux.com)
---------------------------------
19 zone "localhost" IN {
 20         type master;
 21         file "named.localhost";
 22         allow-update { none; };
 23 };
 24
 25 zone "westos.org" IN {
 26         type master;
 27         file "westos.org.zone";
 28         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
 10 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
----------------------------------------------
75 myhostname = maillinux.linux.com
83 mydomain = linux.com
98 myorigin = westos.org
113 inet_interfaces = all
116 #inet_interfaces = localhost
164 mydestination =
313 relayhost = 172.25.254.100  ##间接发送 ip为接受地址
140 local_transport = error:local delivery disabled
----------------------------------------------
systemctl restart postfix.service
systemctl start named

在(mailwestos.westos.com)
vim /etc/postfix/main.cf
264 mynetworks = 172.25.254.0/24
systemctl restart postfix.service

www.extmail.org 邮件系统
lamp=linux apache mysql php   lnmp=linux nginx mysql php

二. curl 查看网站信息
curl -I  www.baidu.com
yum install nmap   著名黑客软件(侵入系统)

server: tengine

三.#### 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>
----------------------------------
##不用修改
用firefox测试  172.25.254.100/index.html

###修改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
------------------
网站内容……
------------------
[[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"
120 DocumentRoot "/www/westos"
121 <Directory "/www/westos">
122         require all granted
123 </Directory>
 42 Listen 80   ##监听端口 默认为80
-------------------------------
systemctl restart httpd
systemctl reload httpd

####网站登陆ip限制####
vim /etc/httpd/conf/httpd.conf
------------------------------
119 #DocumentRoot "/var/www/html"
120 DocumentRoot "/www/westos"
121 <Directory "/www/westos">
122         require all granted
123         Order Allow,Deny          ##注意读取的顺序
124         Deny from ALL
125         Allow from 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的用户 首次加上"-c"
htpasswd -m htpasswdfile admin    ##创建其他登录用户  不用加"-c",否则覆盖第一次创建的用户

ls
conf  conf.d  conf.modules.d  htpasswdfile  logs  modules  run
cat /etc/httpd/htpasswdfile
westos:$apr1$N2tH2dYs$KF7NFjH/OPn.lt.axBc4d.
admin:$apr1$VKKy4N9E$wDUCX1F.fpOfOMVQ6VOPh.

vim /etc/httpd/conf/httpd.conf
-----------------------------------------------------------
120 DocumentRoot "/www/westos"
121 <Directory "/www/westos">
122         #require all granted
123         AllowOverride All
124         Authuserfile /etc/httpd/htpasswdfile
125         Authname "Please input username and password"
126         Authtype basic
127         Require valid-user
128 </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
在测试主机上 修改/etc/hosts
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
同上

2.配置https
yum install mod_ssl -y
yum search util
yum install crypto-utils
genkey www.westos.com
进入选项模式

最终出现:
-------------------------------------------------------------------------------
/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 = 1024 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 will 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 may 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
------------------------------------------------------------------------------
100 SSLCertificateFile /etc/pki/tls/certs/www.westos.com.crt       ##证书
101
102 #   Server Private Key:
103 #   If the key is not combined with the certificate, use this
104 #   directive to point at the key file.  Keep in mind that if
105 #   you‘ve both a RSA and a DSA private key you 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  ##公钥
------------------------------------------------------------------

时间: 2024-08-24 16:44:53

三.mail空壳 apache的相关文章

Java发邮件:Java Mail与Apache Mail

一.邮件简介 一封邮件由很多信息构成,主要的信息如下,其他的暂时不考虑,例如抄送等: 1.收件人:收件人的邮箱地址,例如[email protected] 2.收件人姓名:大部分的邮件显示时都会显示,例如loadfate [email protected] 3.发件人:发件人的邮箱地址 4.发件人姓名: 5.主题:邮件的标题 6.内容及附件:邮件的主要内容 二.使用Java发邮件的通用步骤 一般的项目中没有单独的邮件服务器,一般情况下都是使用别人的服务器. 1.设置smtp服务器:不同的邮件服务

Android Java Mail与Apache Mail发送邮件对比

原文链接: 一.邮件简介  一封邮件由很多信息构成,主要的信息如下,其他的暂时不考虑,例如抄送等:  1.收件人:收件人的邮箱地址,例如[email protected]  2.收件人姓名:大部分的邮件显示时都会显示,例如loadfate [email protected]  3.发件人:发件人的邮箱地址  4.发件人姓名:  5.主题:邮件的标题  6.内容及附件:邮件的主要内容 二.使用Java发邮件的通用步骤  一般的项目中没有单独的邮件服务器,一般情况下都是使用别人的服务器.  1.设置

三.mail 接收权限 dovecot加密通信 php数据库 thunderbird

postconf -d:查看默认设置postconf -n:查看当前设置postconf -e "inet_interfaces = all":修改选项inet_interfaces 参数指定postfix系统监听的网络接口. 一.邮件的限制==access==   ##禁止某个ip接受邮件[[email protected] ~]# cd /etc/postfix/[[email protected] postfix]# lsaccess     generic        mai

第三课unit9 Apache

1.安装 yum install httpd -y systemctl start httpd systemctl enable httpd systemctl stop firewalld systemctl disable firewalld 2.Apache信息 index.html  ##默认发布文件 /etc/httpd/conf/httpd.conf  ##默认配置文件 /etc/httpd/conf/*.conf /var/www/html  ##默认发布目录 80    ##Ap

三.mail发送

#### mail 文件发送 ####1.配置环境(DNS)vim /etc/resolv.confnameserver 172.25.254.114 vim /etc/named.rfc1912.zoneszone "linux.com" IN {        type master;        file "linux.com.zone";        allow-update { none; };}; zone "westos.com"

第 四 十 三 天:Apache 的 相 关 问 题

小Q:人生的意志和劳动将创造奇迹般的奇迹.       -- 涅克拉索夫 apache设置自定义header----------------------------------------- 1. 在设置自定义header前,需要先检测一下你的httpd是否加载了mod_headers /usr/local/apache2/bin/apachectl  -l 否则需要重新编译一下了 2.  在httpd.conf 中加入 <IFModule mod_headers.c> Header add

Apache HTTP Server 与 Tomcat 的三种连接方式介绍

Apache HTTP Server 与 Tomcat 的三种连接方式介绍 整合 Apache Http Server 和 Tomcat 可以提升对静态文件的处理性能.利用 Web 服务器来做负载均衡以及容错.无缝的升级应用程序.本文介绍了三种整合 Apache 和 Tomcat 的方式. 3 评论: 刘 冬 ([email protected]), 开发工程师, 2007 年 1 月 15 日 内容 首先我们先介绍一下为什么要让 Apache 与 Tomcat 之间进行连接.事实上 Tomca

转自IBM:Apache HTTP Server 与 Tomcat 的三种连接方式介绍

http://www.ibm.com/developerworks/cn/opensource/os-lo-apache-tomcat/index.html 整合 Apache Http Server 和 Tomcat 可以提升对静态文件的处理性能.利用 Web 服务器来做负载均衡以及容错.无缝的升级应用程序.本文介绍了三种整合 Apache 和 Tomcat 的方式. 首先我们先介绍一下为什么要让 Apache 与 Tomcat 之间进行连接.事实上 Tomcat 本身已经提供了 HTTP 服

Commons_logging包 Apache通用日志包

他为Log4JLogger:NoOpLog:LogKitLogger:Jdk14Logger:AvalonLogger提供了一共通用的接口进行调用,使得在使用各种不同的第三方日志包时变得非常简单.SimpleLog:是commons_logging自带的一个控制台输出日志. 可以通过简单的配置使用不同的第三方日志包. 在src根目录下放进commons-logging.properties文件,进行配置使用哪个第三方日志包. #定义了使用的具体第三方的日值包 #org.apache.common