• 88pt77788pt777【注册即送88元红利】

  • 发布时间:2016-01-21 19:31 | 作者:yc | 来源:互联网 | 浏览:1200 次
  • 88pt77788pt777【注册即送88元红利】None注解制止运用.htaccess

    Order allow,deny默许拒绝统统,且allow字段在deny字段之前被匹配,或既匹配Allow又匹配Deny,则Deny见效

    allow from all要是是Order deny,allow,则默许准许统统,且Deny字段在Allow句子之前被匹配,若一路匹配Allow和Deny,则Allow见效

    Option常用设置有:

    FollowSymLinks准许在目录中运用符号链接

    Indexes准许目录涉猎,当目录下没有指定的主页文件时,则显现该目录的构造

    MultiViews准许内容洽谈的多注重图

    ExecCGI准许在该目录下实行CGI脚本

    Includes准许效劳端包括内容

    IncludesNoExec同上,但不能实行CGI脚本

    [ ~]# rpm -ivh /media/Server/httpd-2.2.3-31.el5.i386.rpm

    warning: /media/Server/httpd-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libapr-1.so.0 is needed by httpd-2.2.3-31.el5.i386

    libaprutil-1.so.0 is needed by httpd-2.2.3-31.el5.i386

    此刻报错,libapr-1.so.0在apr-1.2.7-11.el5_3.1.i386.rpm中,libaprutil-1.so.0在apr-util-1.2.7-7.el5_3.2.i386.rpm,装配这两个包

    ~]# rpm -ivh /media/Server/apr-1.2.7-11.el5_3.1.i386.rpm

    ~]# rpm -ivh /media/Server/apr-util-1.2.7-7.el5_3.2.i386.rpm

    warning: /media/Server/apr-util-1.2.7-7.el5_3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libpq.so.4 is needed by apr-util-1.2.7-7.el5_3.2.i386.rpm

    又报错,libpq.so.4在包postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    ~]# rpm -ivh /media/Server/postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    再从新装配apr-util这个包,终极再装httpd-2.2.3就OK了

    要是要启用SSL的话,需求再装配个软件包mod_ssl-2.2.3-31.el5.i386.rpm

    [root@dfa ~]# rpm -ivh /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm

    warning: /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libdistcache.so.1 is needed by mod_ssl-2.2.3-31.el5.i386

    libnal.so.1 is needed by mod_ssl-2.2.3-31.el5.i386

    能够看到报错了, 寄托libdistcache.so.1和libnal.so.1装配下面的包可办理

    [ ~]# rpm -ivh /media/Server/distcache-1.4.5-14.1.i386.rpm

    再装配就不会报错了

    [ ~]# rpm -ivh /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm

    warning: /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    Preparing...########################################### [100%]

    1:mod_ssl########################################### [100%]

    重启效劳并反省443端口是不是监听

    [ ~]# service httpd restart

    Stopping httpd:[ OK ]

    Starting httpd:[ OK ]

    [ ~]# netstat -ntpl | grep 443

    tcp00 :::80:::*LISTEN4432/httpd

    tcp00 :::443:::*LISTEN4432/httpd

    至此已完成对Apache对SSL的支撑,在涉猎器中输入https://IP应该能正常拜访

    证书的创立

    cd /etc/pki/tls/certs/

    make server.key

    make server.crt

    mv server.key ../private/

    vi /etc/httpd/conf.d/ssl.conf

    SSLCertificateFile /etc/pki/tls/certs/server.crt

    SSLCertificateKeyFile /etc/pki/tls/private/server.key

    虚拟主机:

    NameVirtualHost *:80

    DocumentRoot /var/www/html/

    ServerName www.linixidc.com

    DocumentRoot /var/www/html/1

    ServerName www.linuxidc.net

    DocumentRoot /var/www/html/2

    对www.linuxidc.net用htaccess完成用户认证

    Options FollowSymLinks

    AllowOverride None

    AuthType Basic

    AuthName test

    AuthUserFile /etc/httpd/conf/aufile

    Require valid-user

    htpasswd -c /etc/httpd/conf/aufile pp#创立文件aufile并新增用户pp

    htpasswd /etc/httpd/conf/aufile oo#在原文件中新增用户oo

    AddDefaultCharset GB2312#设置默许编码为GB2312,不主张运用,注释掉后进,涉猎器会自动检测

    Options FolloSymLinks

    AllowOverride None#设置.htaccess文件中的指令类型None注解制止运用.htaccess

    Order allow,deny默许拒绝统统,且allow字段在deny字段之前被匹配,或既匹配Allow又匹配Deny,则Deny见效

    allow from all要是是Order deny,allow,则默许准许统统,且Deny字段在Allow句子之前被匹配,若一路匹配Allow和Deny,则Allow见效

    Option常用设置有:

    FollowSymLinks准许在目录中运用符号链接

    Indexes准许目录涉猎,当目录下没有指定的主页文件时,则显现该目录的构造

    MultiViews准许内容洽谈的多注重图

    ExecCGI准许在该目录下实行CGI脚本

    Includes准许效劳端包括内容

    IncludesNoExec同上,但不能实行CGI脚本

    ALL包括了除MultiViews以外的统统特点(要是没有Options字段,默许为ALL)

    [ ~]# rpm -八达国际官网ivh /media/Server/httpd-2.2.3-31.el5.i386.rpm

    warning: /media/Server/httpd-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libapr-1.so.0 is needed by httpd-2.2.3-31.el5.i386

    libaprutil-1.so.0 is needed by httpd-2.2.3-31.el5.i386

    此刻报错,libapr-1.so.0在apr-1.2.7-11.el5_3.1.i386.rpm中,libaprutil-1.so.0在apr-util-1.2.7-7.el5_3.2.i386.rpm,装配这两个包

    ~]# rpm -ivh /media/Server/apr-1.2.7-11.el5_3.1.i386.rpm

    ~]# rpm -ivh /media/Server/apr-util-1.2.7-7.el5_3.2.i386.rpm

    warning: /media/Server/apr-util-1.2.7-7.el5_3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libpq.so.4 is needed by apr-util-1.2.7-7.el5_3.2.i386.rpm

    又报错,libpq.so.4在包postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    ~]# rpm -ivh /media/Server/postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    再从新装配apr-util这个包,终极再装httpd-2.2.3就OK了

    要是要启用SSL的话,需求再装配个软件包mod_ssl-2.2.3-31.el5.i386.rpm

    [root@dfa ~]# rpm -ivh /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm

    warning: /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libdistcache.so.1 is needed by mod_ssl-2.2.3-31.el5.i386

    libnal.so.1 is needed by mod_ssl-2.2.3-31.el5.i386

    能够看到报错了, 寄托libdistcache.so.1和libnal.so.1装配下面的包可办理

    [ ~]# rpm -ivh /media/Server/distcache-1.4.5-14.1.i386.rpm

    再装配就不会报错了

    [ ~]# rpm -ivh /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm

    warning: /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    Preparing...########################################### [100%]

    1:mod_ssl########################################### [100%]

    重启效劳并反省443端口是不是监听

    [ ~]# service httpd restart

    Stopping httpd:[ OK ]

    Starting httpd:[ OK ]

    [ ~]# netstat -ntpl | grep 443

    tcp00 :::80:::*LISTEN4432/httpd

    tcp00 :::443:::*LISTEN4432/httpd

    至此已完成对Apache对SSL的支撑,在涉猎器中输入https://IP应该能正常拜访

    证书的创立

    cd /etc/pki/tls/certs/

    make server.key

    make server.crt

    mv server.key ../private/

    vi /etc/httpd/conf.d/ssl.conf

    SSLCertificateFile /etc/pki/tls/certs/server.crt

    SSLCertificateKeyFile /etc/pki/tls/private/server.key

    虚拟主机:

    NameVirtualHost *:80

    DocumentRoot /var/www/html/

    ServerName www.linixidc.com

    DocumentRoot /var/www/html/1

    ServerName www.linuxidc.net

    DocumentRoot /var/www/html/2

    对www.linuxidc.net用htaccess完成用户认证

    Options FollowSymLinks

    AllowOverride None

    AuthType Basic

    AuthName test

    AuthUserFile /etc/httpd/conf/aufile

    Require valid-user

    htpasswd -c /etc/httpd/conf/aufile pp#创立文件aufile并新增用户pp

    htpasswd /etc/httpd/conf/aufile oo#在原文件中新增用户oo

    AddDefaultCharset GB2312#设置默许编码为GB2312,不主张运用,注释掉后进,涉猎器会自动检测

    Options FolloSymLinks

    AllowOverride None#设置.htaccess文件中的指令类型None注解制止运用.htaccess

    Order allow,deny默许拒绝统统,且allow字段在deny字段之前被匹配,或既匹配Allow又匹配Deny,则Deny见效

    allow from all要是是Order deny,allow,则默许准许统统,且Deny字段在Allow句子之前被匹配,若一路匹配Allow和Deny,则Allow见效

    Option常用设置有:

    FollowSymLinks准许在目录中运用符号链接

    Indexes准许目录涉猎,当目录下没有指定的主页文件时,则显现该目录的构造

    MultiViews准许内容洽谈的多注重图

    ExecCGI准许在该目录下实行CGI脚本

    Includes准许效劳端包括内容

    IncludesNoExec同上,但不能实行CGI脚本

    ALL包括了除MultiViews以外的统统特点(要是没有Options字段,默许为ALL)

    [ ~]# rpm -ivh /media/Server/httpd-2.2.3-31.el5.i386.rpm

    warning: /media/Server/httpd-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libapr-1.so.0 is needed by httpd-2.2.3-31.el5.i386

    libaprutil-1.so.0 is needed by httpd-2.2.3-31.el5.i386

    此刻报错,libapr-1.so.0在apr-1.2.7-11.el5_3.1.i386.rpm中,libaprutil-1.so.0在apr-util-1.2.7-7.el5_3.2.i386.rpm,装配这两个包

    ~]# rpm -ivh /media/Server/apr-1.2.7-11.elwww.518.com5_3.1.i386.rpm

    ~]# rpm -ivh /media/Server/apr-util-1.2.7-7.el5_3.2.i386.rpm

    warning: /media/Server/apr-util-1.2.7-7.el5_3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    libpq.so.4 is needed by apr-util-1.2.7-7.el5_3.2.i386.rpm

    又报错,libpq.so.4在包postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    ~]# rpm -ivh /media/Server/postgresql-libs-8.1.11-1.el5_1.1.i386.rpm

    再从新装配apr-util这个包,终极再装httpd-2.2.3就OK了

    要是要启用SSL的话,需求再装配个软件包mod_ssl-2.2.3-31.el5.i386.rpm

    [root@dfa ~]# rpm -ivh /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm

    warning: /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    error: Failed dependencies:

    88pt77788pt777【注册即送88元红利】

    libdistcache.so.1 is needed by mod_ssl-2.2.3-31.el5.i386

    libnal.so.1 is needed by mod_ssl-2.2.3-31.el5.i386

    能够看到报错了, 寄托libdistcache.so.1和libnal.so.1装配下面的包可办理

    [ ~]# rpm -ivh /media/Server/distcache-1.4.5-14.1.i386.rpm

    再装配就不会报错了

    [ ~]# rpm -ivh /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm

    warning: /media/Server/mod_ssl-2.2.3-31.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID

    Preparing...########################################### [100%]

    1:mod_ssl########################################### [100%]

    重启效劳并反省443端口是不是监听

    [ ~]# service httpd restart

    Stopping httpd:[ OK ]

    Starting httpd:[ OK ]

    [ ~]# netstat -ntpl | grep 443

    tcp00 :::80:::*LISTEN4432/httpd

    tcp00 :::443:::*LISTEN4432/httpd

    至此已完成对Apache对SSL的支撑,在涉猎器中输入https://IP应该能正常拜访

    证书的创立

    cd /etc/pki/tls/certs/

    make server.key

    make server.crt

    mv server.key ../private/

    vi /etc/httpd/conf.d/ssl.conf

    88pt77788pt777【注册即送88元红利】

    SSLCertificateFile /etc/pki/tls/certs/server.crt

    SSLCertificateKeyFile /etc/pki/tls/private/server.key

    虚拟主机:

    NameVirtualHost *:80

    DocumentRoot /var/www/html/

    ServerName www.linixidc.com

    DocumentRoot /var/www/html/1

    ServerName www.linuxidc.net

    DocumentRoot /var/www/html/2

    对www.linuxidc.net用htaccess完成用户认证

    Options FollowSymLinks

    AllowOverride None

    AuthType Basic

    AuthName test

    AuthUserFile /etc/httpd/conf/aufile

    Require valid-user

    htpasswd -c /etc/httpd/conf/aufile pp#创立文件aufile并新增用户pp

    htpasswd /etc/httpd/conf/aufile oo#在原文件中新增用户oo

    AddDefaultCharset GB2312#设置默许编码为GB2312,不主张运用,注释掉后进,涉猎器会自动检测

    Options FolloSymLinks

    AllowOverride None#设置.htaccess文件中的指令类型

  • 相关内容

友情链接: