iis/nginx/apache配置301http跳转到https

记录下常用的http跳转https的301配置,免得以后到处找iis配置方式:<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer>  <rewrite>   <rules>    <rule name="...

阅读全文

nginx,apache,tomcat虚拟主机配置及CA证书的配置实例

重头整理下这些WEB服务器的虚拟主机配置,免得以后到处找我们还是先把nginx配置贴出来user  www www;worker_processes  1;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;pid   &...

阅读全文

linux下nginx+apache动静分离以及负载均衡设置

 nginx和apache的安装这么不再赘述,这里直接给出反向代理和负载均衡的配置nginx动静分离配置如下server {    listen       80;    server_name localhost;    index index.php index.html;  &...

阅读全文

linux添加apache到开启启动失败提示“service httpd does not support chkconfig”的解决方法

今天在linux系统上编译apache,全部编译都是正常的,但是到了最后添加开机启动却提示错误#chkconfighttpdon错误代码“servicehttpddoesnotsupportchkconfig”网上说的方法:vi /etc/init.d/httpd   #编辑文件在#!/bin/sh下面添加以下两行#chkconfig:2345 10 90#descrption:Activates/Deactivates Apache Web Se...

阅读全文

linux服务器(nginx或者apache)限制IP访问的方法

nginx环境下新建denyip.conf文件,在服务器/usr/local/nginx/conf目录下的nginx.conf里面,加上include denyip.conf;将屏蔽的IP放到denyip.conf里面deny 110.83.0.0/16;    deny 110.84.111.0/24;    deny 110.85.124.56;保存之后将denyip.conf上传到/usr/local/ngin...

阅读全文

apache使用gzip压缩

GZIP压缩可以减小网络传输中文本数据的体积,能够加快网站访问速度,apache中开启gzip的方式如下打开http.conf文件,首先开启gzip模块,去掉以下模块前面的注释LoadModule deflate_module modules/mod_deflate.so然后,配置何时使用gzip压缩<IfModule mod_deflate.c># 压缩等级 9DeflateCompressionLevel 9# 压缩类型 html、xml、php、...

阅读全文