APACHE linux web服务器

上传人:jiups****uk12 文档编号:39995747 上传时间:2018-05-22 格式:DOC 页数:4 大小:58KB
返回 下载 相关 举报
APACHE linux web服务器_第1页
第1页 / 共4页
APACHE linux web服务器_第2页
第2页 / 共4页
APACHE linux web服务器_第3页
第3页 / 共4页
APACHE linux web服务器_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《APACHE linux web服务器》由会员分享,可在线阅读,更多相关《APACHE linux web服务器(4页珍藏版)》请在金锄头文库上搜索。

1、1995 年,美国国家计算机安全协会(NCSA)的开发者创建了 NCSZ 全球 网络服务软件。Apache 源于 A patchy server 的 读音,意思是充满补丁的服务器。Apache 特点支持最新的 HTTP1.1 协议支持 PHP、CGI、Java servlets、FastCGI支持安全 socket 层集成了 perl 脚本编程语言支持 ssl 和虚拟主机实现动态共享对象,允许在运行时动态加载功能模块具有安全、有效和易于扩展等特征 安装rpm -qa |grep httpdhttpd-suexec-2.0.52-9.entsystem-config-httpd-1.3.1-1h

2、ttpd-manual-2.0.52-9.enthttpd-2.0.52-9.enthttp:/192.168.1.1 看到 Red Hat Enterprise Linux Test Pageps -aux |grep httpdservice httpd start 服务器文件和目录/var/www 站点文件的目录/var/www/html web 文件/var/www/cgi-bin CGI 程序文件/var/www/manual 服务器手册/var/www/usage webalizer 程序文件/var/www/error 错误信息提示/var/www/icons 程序文件/etc/

3、httpd/conf 服务器配置文件目录/etc/httpd/conf/httpd.conf 主配置文件 启动脚本/etc/rc.d/init.d/httpd 应用文件/usr/sbin/httpd 程序文件/usr/share/doc/httpd-2.0.52/ 服务器文档/var/log/httpd 日志文件 服务器启动/etc/rc.d/init.d/httpd statuschkconfig -list httpdchkconfig httpd onservice httpd restart/etc/rc.d/init.d/httpd restart/etc/rc.local选项vi

4、/etc/httpd/conf/httpd.confGlobal EnvironmentServerRoot “/etc/httpd“ 服务器配置文件及日志文件的位置Timeout 120 响应时间,超时KeepAlive ON 提高性能, 允许保持连接MaxKeepAliveRequests 100 连接提出请求的数量,0 表 无限KeepAliveTimeout 15 两次请求的时间间隔StartServers 8 服务器启动时运行的进程数MinSpareServers 5 MaxSpareServers 20 空闲进程数MaxClients 256 并发连接数MaxRequestsPer

5、Child 4000 子进程所请求的数量Listen 80 监听端口Main server configuration User apache 用户Group apache 组启动 apacheServerName new.host.name:80 主机名称,会送到对端DocumentRoot “/var/www/html“ 网页存放的根目录DirectoryIndex index.html index.html.var 默认索引文 件Virtual Hosts 虚拟主机地址ServerAdmin 管理员信箱DocumentRoot / 网页的根目录ServerName 虚拟主机名Erro

6、rLog logs/lerror_log 日志文 件CustomLog logs/ common 别名目录Alias /doc/ “/usr/share/doc/“Options Indexes MultiViewsAllowOverride NoneOrder allow,denyAllow from all 目录的访问控制选项 设置服务器根的访问权限Options FollowSymLinks 允许符号连接AllowOverride None 禁止访问设置根文档的访问权限Options Indexes FollowSymLinks 索引、符号连接AllowOverride None 禁止读

7、取Order allow,deny 先允许后禁止Allow from all(10.10.1.) 全部允许规则 虚拟主机NameVirtualHost 192.168.1.253:80 ServerAdmin .DocumentRoot /var/ServerName ErrorLog logs/-error_logCustomLog logs/-access_log commonServerAdmin DocumentRoot /var/ServerName ErrorLog logs/-error_logCustomLog logs/-access_log commoninclude c

8、onf/vi /etc/httpd/conf/httpd.confab -c 50 -n 100 http:/ SSL 加密安全vi /etc/httpd/conf.d/ssl.conf LoadModule ssl_module modules/mod_ssl.soListen 443SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv 2:+EXPSSLCertificateFile /etc/httpd/conf/ssl.crt/server.crtSSLCertificateKeyFile /etc/htt

9、pd/conf/ssl.key/server.key 证书申请mkdir ca cd ca 第一步,创建 key 和 request:openssl req -new new.cert.csr第二步,从 key 中删除 passphrase(可选):openssl rsa -in privkey.pem -out new.cert.key 第三步,把 request 转换成 signed sert:openssl x509 -in new.cert.csr -out new.cert.cert - req -signkey new.cert.key -days 1825 第四步,把 cert

10、和 key 文件拷贝到适当的位置。cp new.cert.cert /etc/httpd/conf/ssl.crt/server.crt cp new.cert.key /etc/httpd/conf/ssl.key/server.key/usr/sbin/apachectl restartssl/usr/sbin/apachectl configtest SSL 虚拟主机SSLEngine onSSLCipherSuiteALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MED IUM:+LOW:+SSLv2:+EXPSSLCertificateFile /etc/http

11、d/conf/ssl.crt/server.crtSSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.keyservername DocumentRoot “/var/“options indexes followsymlinksallowoverride noneallow from allserveradmin servername DocumentRoot “/var/“options indexes followsymlinksallowoverride noneallow from allserveradmin include conf/sslvh.conf/usr/sbin/apachectl restartssl/usr/sbin/apachectl configtest

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号