日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

LAMP之Apache

發布時間:2024/6/30 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 LAMP之Apache 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Apache是世界使用排名第一的Web服務器軟件。它可以運行在幾乎所有廣泛使用的計算機平臺上,由于其跨平臺和安全性被廣泛使用,是最流行的Web服務器端軟件之一。快速、可靠并且可通過簡單的API擴充,將Perl/Python等解釋器編譯到服務器中。

特點:

  功能強大、配置簡單、速度快、應用廣泛、性能穩定可靠,同時還可以做代理服務器或負載均衡

應用場景:

  運行靜態頁面、圖片(據說處理靜態小文件能力不如Nginx)

  結合PHP引擎運行PHP等程序,LAMP組合

  結合tomcat、resin運行jsp、java等程序

  作代理、負載均衡,rewrite規則過濾等

1、Apache的安裝

檢查系統是否自帶httpd(一般自帶版本比較低,卸載掉)

[root@localhost1 software]# rpm -qa httpd* [root@localhost1 software]# 2、如果沒有自帶 Apache 服務軟件,可以不需要進行下面的卸載 [root@Centos ~]# rpm -e --nodeps httpd-2.2.15-54.el6.centos.x86_64 warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave [root@Centos ~]# rpm -e --nodeps httpd-tools-2.2.15-54.el6.centos.x86_64 [root@localhost1 ~]# cd /home/cairui/ [root@localhost1 cairui]# ls [root@localhost1 cairui]# mkdir software [root@localhost1 cairui]# cd software/ [root@localhost1 software]# wget http://mirrors.hust.edu.cn/apache//httpd/httpd-2.2.34.tar.gz --2018-02-26 16:16:06-- http://mirrors.hust.edu.cn/apache//httpd/httpd-2.2.34.tar.gz Resolving mirrors.hust.edu.cn... 202.114.18.160 Connecting to mirrors.hust.edu.cn|202.114.18.160|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7684419 (7.3M) [application/octet-stream] Saving to: “httpd-2.2.34.tar.gz”100%[====================================>] 7,684,419 212K/s in 45s 2018-02-26 16:16:52 (167 KB/s) - “httpd-2.2.34.tar.gz” saved [7684419/7684419][root@localhost1 software]# ls httpd-2.2.34.tar.gz [root@localhost1 httpd-2.2.34]# tar zxvf httpd-2.2.34.tar.gz [root@localhost1 software]# cd httpd-2.2.34 [root@localhost1 httpd-2.2.34]# ll total 1176 -rw-r--r-- 1 1001 1001 14882 Nov 21 2004 ABOUT_APACHE -rw-r--r-- 1 1001 1001 18613 Jul 6 2012 acinclude.m4 -rw-r--r-- 1 1001 1001 56952 Oct 5 2010 Apache.dsw drwxr-xr-x 6 1001 1001 4096 Jul 6 2017 build -rw-r--r-- 1 1001 1001 2644 Aug 24 2007 BuildAll.dsp -rw-r--r-- 1 1001 1001 2692 Jul 29 2009 BuildBin.dsp -rwxr-xr-x 1 1001 1001 5786 Sep 19 2012 buildconf -rw-r--r-- 1 1001 1001 147887 Jun 28 2017 CHANGES -rw-r--r-- 1 1001 1001 11701 Feb 27 2012 config.layout -rwxr-xr-x 1 1001 1001 574593 Jul 6 2017 configure -rw-r--r-- 1 1001 1001 24720 May 25 2015 configure.in drwxr-xr-x 9 1001 1001 4096 Jul 6 2017 docs -rw-r--r-- 1 1001 1001 403 Nov 21 2004 emacs-style -rw-r--r-- 1 1001 1001 1248 May 7 2011 httpd.dep -rw-r--r-- 1 1001 1001 4124 Jun 11 2008 httpd.dsp -rw-r--r-- 1 1001 1001 8994 May 6 2011 httpd.mak -rw-r--r-- 1 1001 1001 12053 Jul 6 2017 httpd.spec drwxr-xr-x 2 1001 1001 4096 Jul 6 2017 include -rw-r--r-- 1 1001 1001 5129 Jan 9 2017 INSTALL -rw-r--r-- 1 1001 1001 2909 Dec 7 2006 InstallBin.dsp -rw-r--r-- 1 1001 1001 5145 Nov 29 2005 LAYOUT -rw-r--r-- 1 1001 1001 30119 May 7 2011 libhttpd.dep -rw-r--r-- 1 1001 1001 17039 Jan 12 2007 libhttpd.dsp -rw-r--r-- 1 1001 1001 28503 May 6 2011 libhttpd.mak -rw-r--r-- 1 1001 1001 28690 Jan 18 2008 LICENSE -rw-r--r-- 1 1001 1001 8739 Nov 25 2008 Makefile.in -rw-r--r-- 1 1001 1001 34759 Jan 19 2014 Makefile.win drwxr-xr-x 20 1001 1001 4096 Jul 6 2017 modules -rw-r--r-- 1 1001 1001 828 Jan 2 2017 NOTICE -rw-r--r-- 1 1001 1001 12894 Mar 15 2012 NWGNUmakefile drwxr-xr-x 9 1001 1001 4096 Jul 6 2017 os -rw-r--r-- 1 1001 1001 5954 Jan 10 2007 README -rw-r--r-- 1 1001 1001 4178 Aug 27 2014 README.platforms -rw-r--r-- 1 1001 1001 2553 Dec 20 2010 README-win32.txt -rw-r--r-- 1 1001 1001 10183 Mar 14 2005 ROADMAP drwxr-xr-x 3 1001 1001 4096 Jul 6 2017 server drwxr-xr-x 5 1001 1001 4096 Jul 6 2017 srclib drwxr-xr-x 4 1001 1001 4096 Jul 6 2017 support drwxr-xr-x 2 1001 1001 4096 Jul 6 2017 test -rw-r--r-- 1 1001 1001 8183 Oct 17 2005 VERSIONING [root@localhost1 httpd-2.2.34]# cat READMEApache HTTP ServerWhat is it?-----------The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliantweb server. Originally designed as a replacement for the NCSA HTTPServer, it has grown to be the most popular web server on theInternet. As a project of the Apache Software Foundation, thedevelopers aim to collaboratively develop and maintain a robust,commercial-grade, standards-based server with freely availablesource code.The Latest Version------------------Details of the latest version can be found on the Apache HTTPserver project page under <http://httpd.apache.org/>. Documentation-------------The documentation available as of the date of this release isincluded in HTML format in the docs/manual/ directory. The mostup-to-date documentation for the 2.2.x releases can be found at<http://httpd.apache.org/docs/2.2/>. Installation------------Please see the file called INSTALL. Platform specific notes can befound in README.platforms.Licensing---------Please see the file called LICENSE.Cryptographic Software Notice  #加密軟件的通知-----------------------------This distribution may include software that has been designed for usewith cryptographic software. The country in which you currently residemay have restrictions on the import, possession, use, and/or re-exportto another country, of encryption software. BEFORE using any encryptionsoftware, please check your country's laws, regulations and policiesconcerning the import, possession, or use, and re-export of encryptionsoftware, to see if this is permitted. See <http://www.wassenaar.org/>for more information.The U.S. Government Department of Commerce, Bureau of Industry andSecurity (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information securitysoftware using or performing cryptographic functions with asymmetricalgorithms. The form and manner of this Apache Software Foundationdistribution makes it eligible for export under the License ExceptionENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.The following provides more details on the included files thatmay be subject to export controls on cryptographic software:Apache httpd 2.0 and later versions include the mod_ssl module undermodules/ssl/for configuring and listening to connections over SSL encryptednetwork sockets by performing calls to a general-purpose encryptionlibrary, such as OpenSSL or the operating system's platform-specific SSL facilities.In addition, some versions of apr-util provide an abstract interfacefor SSL encrypted network sockets in the files under the directorysrclib/apr-util/ssl/that makes use of a general-purpose encryption library, such asOpenSSL or the operating system's platform-specific SSL facilities.Apache httpd currently does not use that apr-util interface.Some object code distributions of Apache httpd, indicated with theword "crypto" in the package name, may include object code for theOpenSSL encryption library as distributed in open source form from<http://www.openssl.org/source/>. The above files are optional and may be removed if the cryptographicfunctionality is not desired or needs to be excluded from redistribution.Distribution packages of Apache httpd that include the word "nossl"in the package name have been created without the above files and aretherefore not subject to this notice.Contacts--------o If you want to be informed about new code releases, bug fixes,security fixes, general news and information about the Apache serversubscribe to the apache-announce mailing list as described under<http://httpd.apache.org/lists.html#http-announce> o If you want freely available support for running Apache please join theApache user community by subscribing to Users Mailing List at<http://httpd.apache.org/userslist.html> or one of the following USENET newsgroups:comp.infosystems.www.servers.unixcomp.infosystems.www.servers.ms-windowsAlso available at: <http://groups.google.com/groups?group=comp.infosystems.www.servers> o If you want commercial support for running Apache please contactone of the companies and contractors which are listed at<http://www.apache.org/info/support.cgi> o If you have a concrete bug report for Apache please go to theApache Group Bug Database and submit your report:<http://httpd.apache.org/bug_report.html> o If you want to participate in actively developing Apache pleasesubscribe to the `dev@httpd.apache.org' mailing list as described at<http://httpd.apache.org/lists.html#http-dev> Acknowledgments----------------We wish to acknowledge the following copyrighted works thatmake up portions of the Apache software:Portions of this software were developed at the National Centerfor Supercomputing Applications (NCSA) at the University ofIllinois at Urbana-Champaign.This software contains code derived from the RSA Data SecurityInc. MD5 Message-Digest Algorithm, including variousmodifications by Spyglass Inc., Carnegie Mellon University, andBell Communications Research, Inc (Bellcore).Regular expression support is provided by the PCRE library package, whichis open source software, written by Philip Hazel, and copyright by theUniversity of Cambridge, England. The original software is available fromftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ Apache 2 relies heavily on the use of autoconf and libtool to providea build environment. [root@localhost1 httpd-2.2.34]# cat INSTALL APACHE INSTALLATION OVERVIEWCAUTION-------This package represents a legacy version of the Apache HTTP Server softwareand is not current.Please note that Apache Web Server Project will only provide maintenancereleases of the 2.2.x flavor through June of 2017, and will provide somesecurity patches beyond this date through at least December of 2017.Minimal maintenance patches of 2.2.x are expected throughout this period,and users are strongly discouraged from deploying this legacy release.    #不建議安裝較低版本,因為不會再維護Also note, this package includes very stale and known-vulnerable versionsof the Expat [http://expat.sourceforge.net/] and PCRE [http://www.pcre.org/]packages. Users are strongly encouraged to first install the most recentversions of these components.                            #強烈建議安裝最新版本Quick Start - Unix------------------For complete installation documentation, see [ht]docs/manual/install.html orhttp://httpd.apache.org/docs/2.2/install.html $ ./configure --prefix=PREFIX$ make$ make install$ PREFIX/bin/apachectl startNOTES: * Replace PREFIX with the filesystem path under which Apache should be installed. A typical installationmight use "/usr/local/apache2" for PREFIX (without thequotes).* If you are a developer who will be linking your code withApache or using a debugger to step through server code,./configure's --with-included-apr option may be advantageous,as it removes the possibility of version or compile-optionmismatches with APR and APR-util code. (Many OSes nowinclude their own version of APR and APR-util.)* If you are a developer building Apache directly fromSubversion, you will need to run ./buildconf before runningconfigure. This script bootstraps the build environment andrequires Python as well as GNU autoconf and libtool. If youbuild Apache from a release tarball, you don't have to run buildconf.* If you want to build a threaded MPM (for instance worker)on FreeBSD, be aware that threads do not work well withApache on FreeBSD versions before 5.4-RELEASE. If you wishto try a threaded Apache on an earlier version of FreeBSD,use the --enable-threads parameter to ./configure inaddition to the --with-mpm parameter.* If you are building directly from Subversion on Mac OS X(Darwin), make sure to use GNU Libtool 1.4.2 or newer. Allrecent versions of the developer tools on this platforminclude a sufficiently recent version of GNU Libtool (namedglibtool, but buildconf knows where to find it).For a short impression of what possibilities you have, here is atypical example which configures Apache for the installation tree/sw/pkg/apache with a particular compiler and flags plus the twoadditional modules mod_rewrite and mod_speling for later loadingthrough the DSO mechanism:$ CC="pgcc" CFLAGS="-O2" \./configure --prefix=/sw/pkg/apache \--enable-rewrite=shared \--enable-speling=shared The easiest way to find all of the configuration flags for Apache 2.2is to run ./configure --help.Quick Start - Windows---------------------For complete documentation, see manual/platform/windows.html.en orhttp://httpd.apache.org/docs/2.2/platform/windows.html. The Apache/Win32 binaries are distributed as Windows Installer packages (.msi) named httpd-2.2.xx-win32-x86-no_ssl.msi for a version without mod_ssland httpd-2.2.xx-win32-x86-openssl-0.9.8x.msi for a version including themod_ssl plus the openssl library and command line utility. These packagesmay be unpacked without "installing" them by using the msiexec /a option.If you have unpacked a source distribution (named httpd-2.2.x-win32-src.zip, without any -x86 notation) you must compile the package yourself, see the linksmentioned above. Unless you intended to do this, please look again for the binary package from http://www.apache.org/dist/httpd/binaries/win32/ andinstall the desired .msi package.The .msi package configures the httpd.conf file, and installs and starts the Apache2.2 service for you. It also installs plenty of useful shortcutsand the taskbar ApacheMonitor. We strongly encourage you to use it.Postscript----------The Apache HTTP Server group cannot field user's installation questions. There are many valuable forums to help you get started. Please refer yourquestions to the appropriate forum, such as the Users Mailing List athttp://httpd.apache.org/userslist.html or the usenet newsgroups comp.infosystems.www.servers.unix orcomp.infosystems.www.servers.ms-windows.Thanks for using the Apache HTTP Server, version 2.2.The Apache Software Foundationhttp://www.apache.org/ [root@localhost1 httpd-2.2.34]# ./configure --help `configure' configures this package to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]...To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables.  #指定環境變量(例如,CC, CFLAGS…),指定它們為。VAR =價值。以下是一些有用的變量的描述 Defaults for the options are specified in brackets.Configuration:-h, --help display this help and exit--help=short display options specific to this package--help=recursive display the short help of all the included packages-V, --version display version information and exit-q, --quiet, --silent do not print `checking ...' messages--cache-file=FILE cache test results in FILE [disabled]-C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files--srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories:--prefix=PREFIX install architecture-independent files in PREFIX  #指定安裝目錄,默認為/usr/local/apache2[/usr/local/apache2]--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX[PREFIX]By default, `make install' will install all the files in `/usr/local/apache2/bin', `/usr/local/apache2/lib' etc. You can specify an installation prefix other than `/usr/local/apache2' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below.Fine tuning of the installation directories:  #安裝目錄的微調--bindir=DIR user executables [EPREFIX/bin]    #用戶可執行文件--sbindir=DIR system admin executables [EPREFIX/sbin]--libexecdir=DIR program executables [EPREFIX/libexec]--sysconfdir=DIR read-only single-machine data [PREFIX/etc]--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]--localstatedir=DIR modifiable single-machine data [PREFIX/var]--libdir=DIR object code libraries [EPREFIX/lib]--includedir=DIR C header files [PREFIX/include]--oldincludedir=DIR C header files for non-gcc [/usr/include]--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]--datadir=DIR read-only architecture-independent data [DATAROOTDIR]--infodir=DIR info documentation [DATAROOTDIR/info]--localedir=DIR locale-dependent data [DATAROOTDIR/locale]--mandir=DIR man documentation [DATAROOTDIR/man]--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]--htmldir=DIR html documentation [DOCDIR]--dvidir=DIR dvi documentation [DOCDIR]--pdfdir=DIR pdf documentation [DOCDIR]--psdir=DIR ps documentation [DOCDIR]System types:--build=BUILD configure for building on BUILD [guessed]--host=HOST cross-compile to build programs to run on HOST [BUILD]--target=TARGET configure for building compilers for TARGET [HOST]Optional Features:    #可選特性--disable-option-checking ignore unrecognized --enable/--with options  #忽略 unrecognized --enable/--with選項--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)  #不包括FEATURE(和 --enale-FEATURE=no一樣)--enable-FEATURE[=ARG] include FEATURE [ARG=yes]--enable-layout=LAYOUT--enable-v4-mapped Allow IPv6 sockets to handle IPv4 connections  #允許IPv6處理IPv4連接--enable-exception-hook Enable fatal exception hook--enable-maintainer-modeTurn on debugging and compile time warnings    #打開調試并且編譯時警告--enable-pie Build httpd as a Position Independent Executable--enable-modules=MODULE-LISTSpace-separated list of modules to enable | "all" |"most"--enable-mods-shared=MODULE-LISTSpace-separated list of shared modules to enable |"all" | "most"--disable-authn-file file-based authentication control--enable-authn-dbm DBM-based authentication control--enable-authn-anon anonymous user authentication control--enable-authn-dbd SQL-based authentication control--disable-authn-default authentication backstopper--enable-authn-alias auth provider alias--disable-authz-host host-based authorization control--disable-authz-groupfile'require group' authorization control--disable-authz-user 'require user' authorization control--enable-authz-dbm DBM-based authorization control--enable-authz-owner 'require file-owner' authorization control--enable-authnz-ldap LDAP based authentication--disable-authz-default authorization control backstopper--disable-auth-basic basic authentication--enable-auth-digest RFC2617 Digest authentication--enable-isapi isapi extension support--enable-file-cache File cache--enable-cache dynamic file caching--enable-disk-cache disk caching module--enable-mem-cache memory caching module--enable-dbd Apache DBD Framework--enable-bucketeer buckets manipulation filter--enable-dumpio I/O dump filter--enable-echo ECHO server--enable-example example and demo module--enable-case-filter example uppercase conversion filter--enable-case-filter-in example uppercase conversion input filter--enable-reqtimeout Limit time waiting for request from client--enable-ext-filter external filter module--disable-include Server Side Includes--disable-filter Smart Filtering--enable-substitute response content rewrite-like filtering--disable-charset-lite character set translation--enable-charset-lite character set translation--enable-deflate Deflate transfer encoding support    #壓縮傳輸編碼的支持,提高傳輸速度,提升用戶訪問體驗--enable-ldap LDAP caching and connection pooling services--disable-log-config logging configuration--enable-log-forensic forensic logging--enable-logio input and output logging--disable-env clearing/setting of ENV vars--enable-mime-magic automagically determining MIME type--enable-cern-meta CERN-type meta files--enable-expires Expires header control    #EXPIRES頭部控制,激活允許通過配置文件控制HTTP的頭文件,即對網站的圖片等內容,提供在客戶端瀏覽器緩存的設置--enable-headers HTTP header control    #HTTP的頭部控制--enable-ident RFC 1413 identity check--enable-usertrack user-session tracking--enable-unique-id per-request unique ids--disable-setenvif basing ENV vars on headers--disable-version determining httpd version in config files--enable-proxy Apache proxy module--enable-proxy-connect Apache proxy CONNECT module--enable-proxy-ftp Apache proxy FTP module--enable-proxy-http Apache proxy HTTP module--enable-proxy-scgi Apache proxy SCGI module--enable-proxy-ajp Apache proxy AJP module--enable-proxy-balancer Apache proxy BALANCER module--enable-ssl SSL/TLS support (mod_ssl)--enable-distcache Select distcache support in mod_ssl--enable-optional-hook-exportexample optional hook exporter--enable-optional-hook-importexample optional hook importer--enable-optional-fn-importexample optional function importer--enable-optional-fn-exportexample optional function exporter--enable-static-support Build a statically linked version of the supportbinaries--enable-static-htpasswdBuild a statically linked version of htpasswd--enable-static-htdigestBuild a statically linked version of htdigest--enable-static-rotatelogsBuild a statically linked version of rotatelogs--enable-static-logresolveBuild a statically linked version of logresolve--enable-static-htdbm Build a statically linked version of htdbm--enable-static-ab Build a statically linked version of ab--enable-static-checkgidBuild a statically linked version of checkgid--enable-static-htcachecleanBuild a statically linked version of htcacheclean--enable-static-httxt2dbmBuild a statically linked version of httxt2dbm--enable-http HTTP protocol handling--disable-mime mapping of file-extension to MIME--enable-dav WebDAV protocol handling--disable-status process/thread monitoring--disable-autoindex directory listing--disable-asis as-is filetypes--enable-info server information--enable-suexec set uid and gid for spawned processes--disable-cgid CGI scripts--enable-cgi CGI scripts--disable-cgi CGI scripts--enable-cgid CGI scripts--enable-dav-fs DAV provider for the filesystem--enable-dav-lock DAV provider for generic locking--enable-vhost-alias mass virtual hosting module--disable-negotiation content negotiation--disable-dir directory request handling--enable-imagemap server-side imagemaps--disable-actions Action triggering on requests--enable-speling correct common URL misspellings--disable-userdir mapping of requests to user-specific directories--disable-alias mapping of requests to different filesystem parts--enable-rewrite rule based URL manipulation  #提供基于URL規則的重寫功能,根據已知URL地址,轉換其他要訪問的URL地址--enable-so DSO capability  #DSO的能力,即在以后億DSO的方式編譯安裝共享模塊Optional Packages:--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)--with-included-apr Use bundled copies of APR/APR-Util--with-apr=PATH prefix for installed APR or the full path toapr-config--with-apr-util=PATH prefix for installed APU or the full path toapu-config--with-pcre=PATH Use external PCRE library--with-port=PORT Port on which to listen (default is 80)--with-sslport=SSLPORT Port on which to securelisten (default is 443)--with-z=DIR use a specific zlib library--with-sslc=DIR RSA SSL-C SSL/TLS toolkit--with-ssl=DIR OpenSSL SSL/TLS toolkit--with-mpm=MPM Choose the process model for Apache to use.MPM={beos|event|worker|prefork|mpmt_os2|winnt}  #選擇用于Apache的模式,生產模式用worker,此模式原理是更多使用線程來處理請求--with-module=module-type:module-fileEnable module-file in the modules/<module-type>directory.                #允許多少模塊在編譯中--with-program-name alternate executable name--with-suexec-bin Path to suexec binary--with-suexec-caller User allowed to call SuExec--with-suexec-userdir User subdirectory--with-suexec-docroot SuExec root directory--with-suexec-uidmin Minimal allowed UID--with-suexec-gidmin Minimal allowed GID--with-suexec-logfile Set the logfile--with-suexec-safepath Set the safepath--with-suexec-umask umask for suexec'd process Some influential environment variables:CC C compiler commandCFLAGS C compiler flagsLDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in anonstandard directory <lib dir>LIBS libraries to pass to the linker, e.g. -l<library>CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> ifyou have headers in a nonstandard directory <include dir>CPP C preprocessorUse these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations.Report bugs to the package provider.

2、apache依賴組件安裝

[root@localhost1 httpd-2.2.34]# yum install gcc* zlib* -y [root@localhost1 opt]# ./configure --prefix=/opt/apache2.2.34 --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite [root@localhost1 opt]# make & make install [root@localhost1 opt]# cd /opt/ [root@localhost1 opt]# ls apache2.2.34 [root@localhost1 opt]# ln -s apache2.2.34/ apache/ ln: target `apache/' is not a directory: No such file or directory [root@localhost1 opt]# ln -s apache2.2.34/ apache [root@localhost1 opt]# ls apache apache2.2.34

啟動服務:

[root@localhost1 opt]# /opt/apache/bin/apachectl start httpd: apr_sockaddr_info_get() failed for localhost1 httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName 服務啟動成功,但由于沒有DNS出現這種提示,解決辦法如下[root@localhost1 conf]# vim /opt/apache/conf/httpd.conf ^CServerName www.example.com:80==========>localhost:80(192.168.1.2:80) [root@localhost1 conf]# /opt/apache/bin/apachectl graceful

It works!表示配置成功。

3、Apache重要目錄

[root@localhost1 apache]# ll total 60 drwxr-xr-x 2 root root 4096 Feb 26 17:10 bin  #apche命令的目錄,如服務啟動命令 drwxr-xr-x 2 root root 4096 Feb 26 17:10 build drwxr-xr-x 2 root root 4096 Feb 26 17:10 cgi-bin drwxr-xr-x 4 root root 4096 Feb 26 17:33 conf drwxr-xr-x 3 root root 4096 Feb 26 17:10 error drwxr-xr-x 2 root root 4096 Jul 6 2017 htdocs  默認站點目錄 drwxr-xr-x 3 root root 4096 Feb 26 17:10 icons drwxr-xr-x 2 root root 4096 Feb 26 17:10 include drwxr-xr-x 3 root root 4096 Feb 26 17:10 lib drwxr-xr-x 2 root root 4096 Feb 26 17:33 logs  日志目錄 drwxr-xr-x 4 root root 4096 Feb 26 17:10 man drwxr-xr-x 14 root root 12288 Jul 6 2017 manual drwxr-xr-x 2 root root 4096 Feb 26 17:10 modules  apache的模塊目錄,一些程序經過編譯后都存放在這里

(1)

[root@localhost1 apache]# tree -l 1 bin/ 1 [error opening dir] bin/ ├── ab    HTTP服務器性能測試工具 ├── apachectl  服務的啟動命令,同樣它也是一個腳本 ├── apr-1-config ├── apu-1-config ├── apxs    是一個為HTTP服務器編譯和安裝擴展模塊的工具 ├── checkgid ├── dbmmanage ├── envvars ├── envvars-std ├── htcacheclean  這是清理磁盤緩沖區的命令,需要在編譯時指定相關的參數,很少使用 ├── htdbm ├── htdigest ├── htpasswd  建立和更新基本認證文件,后面配置監控服務會用到 ├── httpd  是apache的控制命令程序,apachectl執行時會調用httpd ├── httxt2dbm ├── logresolve └── rotatelogs  apache自帶的日志輪訓命令0 directories, 17 files

(2)

[root@localhost1 apache]# tree -L 1 conf/ conf/ ├── extra  apache額外的配置文件目錄,實際生產環境中經常使用或修改,如httpd-vhosts.conf默認在此 ├── httpd.conf  主配置文件 ├── magic ├── mime.types └── original2 directories, 3 files

(3)

[root@localhost1 apache]# tree -L 1 htdocs/ htdocs/ └── index.html0 directories, 1 file

[root@localhost1 htdocs]# cat index.html
<html><body><h1>It works!</h1></body></html>

(4)

[root@localhost1 apache]# tree -L 1 logs/ logs/ ├── access_log  默認訪問日志目錄 ├── cgisock.27892 ├── error_log  錯誤日志文件,服務啟動故障或其他問題,都可以查看此文件 └── httpd.pid0 directories, 4 files

主配置文件:

[root@localhost1 conf]# egrep -v "^.*#|^$" httpd.conf |nl1 ServerRoot "/opt/apache2.2.34"  #apache根目錄,只能root訪問,一般不做修改2 Listen 80  apache監聽端口,默認為80端口3 <IfModule !mpm_netware_module>4 <IfModule !mpm_winnt_module>5 User daemon  apache的用戶,默認是daemon,實際生產環境建議修改6 Group daemon7 </IfModule>8 </IfModule>9 ServerAdmin you@example.com  系統管理員的郵箱,實際生產環境中修改為管理郵箱,有故障可直接發送至郵箱10 ServerName localhost:80(192.168.181.128:80)11 DocumentRoot "/opt/apache2.2.34/htdocs"12 <Directory />  禁止訪問文件系統所在的目錄13 Options FollowSymLinks14 AllowOverride None  禁止用戶對目錄配置文件進行修改15 Order deny,allow16 Deny from all17 </Directory>18 <Directory "/opt/apache2.2.34/htdocs">  apache默認網站站點目錄路徑19 Options Indexes FollowSymLinks20 AllowOverride None21 Order allow,deny22 Allow from all23 </Directory>24 <IfModule dir_module>25 DirectoryIndex index.html配置的默認首頁文件,如虛擬機沒有設置,默認就調用這里的配置,首頁文件可以有多個,每個文件用空格分開,調用時,前面的優先匹配26 </IfModule>27 <FilesMatch "^\.ht">  防止.htaccess和.htpasswd等隱藏文件被Web用戶查看28 Order allow,deny29 Deny from all30 Satisfy All31 </FilesMatch>32 ErrorLog "logs/error_log"  錯誤日志路徑33 LogLevel warn34 <IfModule log_config_module>35 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined36 LogFormat "%h %l %u %t \"%r\" %>s %b" common37 <IfModule logio_module>38 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio39 </IfModule>40 CustomLog "logs/access_log" common41 </IfModule>42 <IfModule alias_module>43 ScriptAlias /cgi-bin/ "/opt/apache2.2.34/cgi-bin/"44 </IfModule>45 <IfModule cgid_module>46 </IfModule>47 <Directory "/opt/apache2.2.34/cgi-bin">48 AllowOverride None49 Options None50 Order allow,deny51 Allow from all52 </Directory>53 DefaultType text/plain54 <IfModule headers_module>55 RequestHeader unset Proxy early56 </IfModule>57 <IfModule mime_module>58 TypesConfig conf/mime.types59 AddType application/x-compress .Z60 AddType application/x-gzip .gz .tgz61 </IfModule>62 <IfModule ssl_module>63 SSLRandomSeed startup builtin64 SSLRandomSeed connect builtin65 </IfModule>

Apache擴展的配置文件

Apache擴展的配置文件是通過httpd.conf主配置文件中嵌入Include命令來實現,不過默認情況下是這樣:

# Virtual hosts #Include conf/extra/httpd-vhosts.conf# Various default settings #Include conf/extra/httpd-default.conf去掉注釋,即加入擴展

使用tree列出apache擴展的配置文件所有目錄的配置文件

[root@localhost1 conf]# tree -L 2 /opt/apache/conf/extra/ /opt/apache/conf/extra/ ├── httpd-autoindex.conf ├── httpd-dav.conf  dav支持配置 ├── httpd-default.conf  apache相關服務參數(超時時間、保持連續時間等) ├── httpd-info.conf ├── httpd-languages.conf  語言支持配置 ├── httpd-manual.conf ├── httpd-mpm.conf  服務器池管理,也就是優化apache的一個配置文件 ├── httpd-multilang-errordoc.conf ├── httpd-ssl.conf  提供apache ssl支持配配置文件 ├── httpd-userdir.conf └── httpd-vhosts.conf  虛擬主機的配置文件0 directories, 11 files [root@localhost1 conf]# cat extra/httpd-vhosts.conf # # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below.  #如果你希望維護多個域名/主機名,你可以為她們設置虛擬主機容器。大部分只使用基于名稱的虛擬主機。 # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration.# # Use name-based virtual hosting. # NameVirtualHost *:80  80監聽端口# # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # <VirtualHost *:80>ServerAdmin webmaster@dummy-host.example.comDocumentRoot "/opt/apache2.2.34/docs/dummy-host.example.com"ServerName dummy-host.example.com  這里配置提供的域名,生產環境需要把域名解析到服務器上,同時配置到外網IP上ServerAlias www.dummy-host.example.com  設置別名,此功能需要 apache mod_alias模塊支持ErrorLog "logs/dummy-host.example.com-error_log"  錯誤日志目錄CustomLog "logs/dummy-host.example.com-access_log" common  日志配置文件 </VirtualHost><VirtualHost *:80>ServerAdmin webmaster@dummy-host2.example.comDocumentRoot "/opt/apache2.2.34/docs/dummy-host2.example.com"ServerName dummy-host2.example.comErrorLog "logs/dummy-host2.example.com-error_log"CustomLog "logs/dummy-host2.example.com-access_log" common </VirtualHost>

查看apache編譯參數

[root@localhost1 conf]# cat /opt/apache/build/config.nice #! /bin/sh # # Created by configure"./configure" \ "--prefix=/opt/apache2.2.34" \ "--enable-deflate" \ "--enable-expires" \ "--enable-headers" \ "--enable-modules=most" \ "--enable-so" \ "--with-mpm=worker" \ "--enable-rewrite" \ "$@"

?4、Apache服務基于域名的虛擬主機配置

開啟虛擬機功能

?

[root@localhost1 conf]# grep "httpd-vhosts.conf" /opt/apache/conf/httpd.conf Include conf/extra/httpd-vhosts.conf

?配置虛擬主機配置文件(httpd-vhosts.conf)

?

[root@localhost1 extra]# cat httpd-vhosts.conf # # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration.# # Use name-based virtual hosting. # NameVirtualHost *:80  #這一行一定要去掉,不然會出錯,此文件只保留下面的配置文件# # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. # <VirtualHost *:80>ServerAdmin 928939638@qq.comDocumentRoot "/data/www/bbs"ServerName bbs.abc.comServerAlias abc.comErrorLog "logs/bbs-error_log"CustomLog "logs/bbs_access_log" common </VirtualHost>

修改完成之后,在apache主配置文件中(httpd.conf)中加入虛擬機許可

修改windows本地hosts

錯誤總結:

配置了下虛擬主機,localhost打開發現錯誤:HTTP 錯誤 403 - 禁止訪問,即403 Forbidden:You don't have permission to access / on this server. 可能是權限不足引起的問題。解決方法:打開apache的配置文件httpd.conf,逐行檢查。找到:代碼示例: <Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowDeny from all </Directory>由于配置了php后,此處“Deny from all”為拒絕一切連接。把此行修改為 “Allow from all”,即可解決問題。修改后的代碼為:代碼示例: <Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowallow from all </Directory>瀏覽器里打開http://localhost,問題解決。 總結: 在apache服務器中,遇到403禁止訪問時,重點關注下apache的httpd.conf配置文件中,是否有“Deny from all”這樣的代碼。 這個可能是修改了某些配置文件后,重啟apache,被自動更改的。附,另外一個apache 403錯誤的例子。apache 403錯誤,顯示信息如下: 您無權查看該網頁 您可能沒有權限用您提供的憑據查看此目錄或網頁 如果您確信能夠查看該目錄或網頁,請嘗試使用 192.168.1.5 主頁上所列的電子郵件地址或電話與網站聯系。 可以單擊搜索,尋找 Internet 上的信息。HTTP 錯誤 403 - 禁止訪問 Internet Explorer去掉顯示友好信息的鉤后顯示Forbidden You don't have permission to access \ on this server. 檢查了一遍配置文件httpd.conf,找到這么一段:代碼示例: <Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowdeny from allSatisfy all </Directory>然后試著把deny from all中的deny改成了allow,保存后重起了apache,訪問測試網站完全正常了。 APACHE升級到2.2版本之后,提供和支持不少模塊的支持,性能和安全上也有不少改進。 以前配置好apache的httpd.conf之后,即可使用。 但現在必須額外對這個文件進行其他方面的配置,不然會出現 http 403權限問題錯誤。解決方法。 以下為httpd.conf文件的其中一段原代碼。 把下面代碼紅色標志進行更改:代碼示例: <Directory "E:/wamp/www">## Possible values for the Options directive are "None", "All",# or any combination of:# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews## Note that "MultiViews" must be named *explicitly* --- "Options All"# doesn't give it to you. ## The Options directive is both complicated and important. Please see# [url]http://httpd.apache.org/docs/2.2/mod/core.html#options[/url]# for more information.#Options Indexes FollowSymLinks## AllowOverride controls what directives may be placed in .htaccess files.# It can be "All", "None", or any combination of the keywords:# Options FileInfo AuthConfig Limit#AllowOverride all## Controls who can get stuff from this server.# # onlineoffline tag - don't remove Order Deny,AllowDeny from allAllow from 127.0.0.1 </Directory>紅色部分更改為 Allow from all ,也就是所有訪問允許通過。
http://blog.csdn.net/u011130583/article/details/42363831

5、基于端口的虛擬主機配置

實際生產環境中有很多是基于域名的虛擬主機,有很多引用場景:公司內網(如網站后臺界面、其他發布類的頁面)都是基于端口的虛擬配置。

默認情況http默認監聽80端口,所以配置基于端口的主機,就是想應的增加監聽端口

?

[root@localhost1 ~]# cat /opt/apache/conf/extra/httpd-vhosts.conf | grep -v "#"<VirtualHost 192.168.181.128:8888>ServerAdmin 928939638@qq.comDocumentRoot "/data/www/bbs"ServerName 192.168.181.1ServerAlias abc.comErrorLog "logs/bbs-error_log"CustomLog "logs/bbs-access_log" common </VirtualHost><VirtualHost 192.168.181.128:9999>ServerAdmin 928939638@qq.comDocumentRoot "/data/www/blog"ServerName 192.168.181.2ServerAlias abc.comErrorLog "logs/bbs-error_log"CustomLog "logs/bbs-access_log" common </VirtualHost> [root@localhost1 ~]# cat /opt/apache/conf/httpd.conf | grep -v "#"ServerRoot "/opt/apache2.2.34"Listen 80 Listen 8888 Listen 9999<IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> User daemon Group daemon</IfModule> </IfModule>ServerAdmin you@example.comServerName 192.168.181.128:80DocumentRoot "/opt/apache2.2.34/htdocs"<Directory />Options FollowSymLinksAllowOverride NoneOrder deny,allowAllow from all </Directory><Directory "/opt/apache2.2.34/htdocs">Options -Indexes FollowSymLinksAllowOverride NoneOrder allow,denyAllow from all</Directory><IfModule dir_module>DirectoryIndex index.html </IfModule><FilesMatch "^\.ht">Order allow,denyDeny from allSatisfy All </FilesMatch>ErrorLog "logs/error_log"LogLevel warn<IfModule log_config_module>LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %>s %b" common<IfModule logio_module>LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio</IfModule>CustomLog "logs/access_log" common</IfModule><IfModule alias_module>ScriptAlias /cgi-bin/ "/opt/apache2.2.34/cgi-bin/"</IfModule><IfModule cgid_module> </IfModule><Directory "/opt/apache2.2.34/cgi-bin">AllowOverride NoneOptions NoneOrder allow,denyAllow from all </Directory>DefaultType text/plain<IfModule headers_module>RequestHeader unset Proxy early </IfModule><IfModule mime_module>TypesConfig conf/mime.typesAddType application/x-compress .ZAddType application/x-gzip .gz .tgz</IfModule>Include conf/extra/httpd-mpm.conf Include conf/extra/httpd-vhosts.conf<IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule><Directory "/data/www/bbs">Options FollowSymLinksAllowOverride NoneOrder allow,denyAllow from all </Directory><Directory "/data/www/blog">Options FollowSymLinksAllowOverride NoneOrder allow,denyAllow from all </Directory> [root@localhost1 ~]# cat /data/www/bbs/index.html this is a bbs page [root@localhost1 ~]# cat /data/www/blog/index.html this is blog page

[root@localhost1 ~]# cat /opt/apache/conf/extra/httpd-vhosts.conf | grep -v "#"<VirtualHost *:8888>ServerAdmin 928939638@qq.comDocumentRoot "/data/www/bbs"ServerName bbs.abc.comServerAlias abc.comErrorLog "logs/bbs-error_log"CustomLog "logs/bbs-access_log" common </VirtualHost><VirtualHost *:9999>ServerAdmin 928939638@qq.comDocumentRoot "/data/www/blog"ServerName blog.abc.comServerAlias abc.comErrorLog "logs/bbs-error_log"CustomLog "logs/bbs-access_log" common </VirtualHost>

6、Apache服務mod_expires緩存模塊

簡介:

  此模塊是允許通過Apache配置文件控制HTTP的“expires”和“cache-control”頭的內容,用于控制服務器應答時的“expires”頭的內容和“cache-control”頭的max-age的指令,這個有效期可以設置為對于源文件最后的修改時間或客戶端訪問的時間

  這些HTTP頭向客戶端表明了內容的有效性和持久性,如果客戶端本地有緩存,則用戶再次訪問時讀取的內容就是從緩存里讀取的(緩存沒有失效的情況下)而不是從服務器端讀取的,客戶端還會檢查緩存中的內容,看看是不是需要從服務器端進行更新,從而增加用戶的體驗度,減少服務器的壓力,實際生產環境中也是重要的調優參數之一。

(1)檢查與安裝模塊

具體編譯命令如下 [root@Centos httpd-2.4.23]# ./configure\ --enable-expires 以 DSO 的方式編譯安裝如下 cd /Downloads/tools/httpd2.2.24/modules/metadata/ /application/apache/bin/apxs -c -i -a mod_expires.c 參數說明 -a 此選項會自動增加一個 LoadModule 行到 httpd.conf 文件中,來激活模塊,如果此行已存在,則啟用 -c 此選項表示需要執行編譯操作 -i 此選項表示需要執行安裝操作,以安裝一個或多個動態共享對象到服務器 modules 目錄中 [root@Centos modules]# cd /Downloads/tools/httpd-2.4.23/modules/metadata/ [root@Centos metadata]# /application/apache/bin/apxs -a -c -i mod_expires.c 處程省略 ---------------------------------------------------------------------- chmod 755 /application/apache2.4.23/modules/mod_expires.so [activating module `expires' in /application/apache2.4.23/conf/httpd.conf]

檢查當前的http headers信息

[root@localhost1 httpd-2.2.34]# curl -I http://bbs.abc.com:8888/ HTTP/1.1 200 OK Date: Tue, 27 Feb 2018 05:14:26 GMT Server: Apache/2.2.34 (Unix) DAV/2 Last-Modified: Tue, 27 Feb 2018 01:19:12 GMT ETag: "a059e-13-566276a119d53" Accept-Ranges: bytes Content-Length: 19 Content-Type: text/html

(2)配置模塊

配置模塊有兩種模式:主配置里面配置與單個虛擬主機配置文件里配置

配置HTTP主配置文件如下

[root@localhost1 httpd-2.2.34]# vim /opt/apache/conf/httpd.conf [root@localhost1 httpd-2.2.34]# tail -10 /opt/apache/conf/httpd.conf ExpiresActive onExpiresDefault "access plus 12 month"ExpiresByType text/css "access plus 12 month"ExpiresByType image/gif "access plus 12 month"ExpiresByType image/jpge "access plus 12 month"ExpiresByType image/jpg "access plus 12 month"ExpiresByType image/png "access plus 12 month"ExpiresByType application/x-shockwave-flash "access plus 12 month"ExpiresByType application/x-javascript "access plus 12 month"ExpiresByType video/x-flv "access plus 12 month" [root@localhost1 httpd-2.2.34]# tail -20 /opt/apache/conf/httpd.confAllow from all </Directory><Directory "/data/www/blog">Options FollowSymLinksAllowOverride NoneOrder allow,denyAllow from all </Directory>ExpiresActive onExpiresDefault "access plus 12 month"ExpiresByType text/css "access plus 12 month"ExpiresByType image/gif "access plus 12 month"ExpiresByType image/jpge "access plus 12 month"ExpiresByType image/jpg "access plus 12 month"ExpiresByType image/png "access plus 12 month"ExpiresByType application/x-shockwave-flash "access plus 12 month"ExpiresByType application/x-javascript "access plus 12 month"ExpiresByType video/x-flv "access plus 12 month"

[root@localhost1 bbs]# curl -I http://bbs.abc.com:8888/ HTTP/1.1 200 OK Date: Tue, 27 Feb 2018 05:25:29 GMT Server: Apache/2.2.34 (Unix) DAV/2 Last-Modified: Tue, 27 Feb 2018 01:19:12 GMT ETag: "a059e-13-566276a119d53" Accept-Ranges: bytes Content-Length: 19 Cache-Control: max-age=31104000 Expires: Fri, 22 Feb 2019 05:25:29 GMT Content-Type: text/html

說明如果配置HTTP主配置文件,則全局生效,虛擬主機配置文件則不需要配置

配置單個虛擬主機文件如下:

<VirtualHost *:9999> ServerAdmin admini@abc.com DocumentRoot "/data/www/blog" ServerName blog.abc.com ServerAlias blog1.com ErrorLog "logs/bbs-error_log" CustomLog "logs/bbs-access_log" common ExpiresActive on ExpiresDefault "access plus 12 month" ExpiresByType text/css "access plus 12 month" ExpiresByType image/gif "access plus 12 month" ExpiresByType image/jpge "access plus 12 month" ExpiresByType image/jpg "access plus 12 month" ExpiresByType image/png "access plus 12 month" ExpiresByType application/x-shockwave-flash "access plus 12 month" ExpiresByType application/x-javascript "access plus 12 month" ExpiresByType video/x-flv "access plus 12 month"

(3)mod_expires模塊的優點:

  提升用戶對網站的體驗度:由于一些文件緩存在本地,訪問速度提升了,用戶體驗也就提升了

  減少服務器帶寬與負載壓力:由于用戶訪問時時讀取本地緩存的文件內容,減少了與服務器之間的交互,從而減少了服務器的壓力

  節約維護服務器成本:和上述一樣,服務器壓力小了,維護人員也會相應的減少,服務器配件配置更新的速度也會相應的慢下來

  注:這個緩存也會有失效的時候就是用戶主動清空瀏覽器緩存或者有效期過期

7、Apache的mod_deflate壓縮模塊

簡介:

  此壓縮模塊提供了DEFLATE輸出過濾器,允許服務器將內容發送給客戶端之前進行壓縮,節省帶寬資源

[root@localhost1 bbs]# /opt/apache/bin/apachectl -l | grep 'deflate'mod_deflate.c [root@localhost1 bbs]# curl -I http://bbs.abc.com:8888/ HTTP/1.1 200 OK Date: Tue, 27 Feb 2018 05:40:50 GMT Server: Apache/2.2.34 (Unix) DAV/2 Last-Modified: Tue, 27 Feb 2018 01:19:12 GMT ETag: "a059e-13-566276a119d53" Accept-Ranges: bytes Content-Length: 19 Cache-Control: max-age=31104000 Expires: Fri, 22 Feb 2019 05:40:50 GMT Content-Type: text/html [root@localhost1 bbs]# vim /opt/apache/conf/httpd.conf [root@localhost1 bbs]# tail -20 /opt/apache/conf/httpd.conf </Directory>ExpiresActive onExpiresDefault "access plus 12 month"ExpiresByType text/css "access plus 12 month"ExpiresByType image/gif "access plus 12 month"ExpiresByType image/jpge "access plus 12 month"ExpiresByType image/jpg "access plus 12 month"ExpiresByType image/png "access plus 12 month"ExpiresByType application/x-shockwave-flash "access plus 12 month"ExpiresByType application/x-javascript "access plus 12 month"ExpiresByType video/x-flv "access plus 12 month"<IfModule mod_deflate.c>DeflateCompressionLevel 9SetOutputFilter DEFLATEAddOutputFilterByType DEFLATE text/html text/plain /text/xmlAddOutputFilterByType DEFLATE application/javascriptAddOutputFilterByType DEFLATE text/css </IfModule> [root@localhost1 bbs]# /opt/apache/bin/apachectl -t Syntax OK [root@localhost1 bbs]# /opt/apache/bin/apachectl graceful [root@localhost1 bbs]# lsof -i tcp:8888 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME httpd 27892 root 6w IPv6 63602 0t0 TCP *:ddi-tcp-1 (LISTEN) httpd 45450 daemon 6u IPv6 63602 0t0 TCP *:ddi-tcp-1 (LISTEN) httpd 45451 daemon 6u IPv6 63602 0t0 TCP *:ddi-tcp-1 (LISTEN) [root@localhost1 bbs]# curl -I http://bbs.abc.com:8888/1.jpg HTTP/1.1 200 OK Date: Tue, 27 Feb 2018 05:45:08 GMT Server: Apache/2.2.34 (Unix) DAV/2 Last-Modified: Wed, 29 Nov 2017 08:16:39 GMT ETag: "a059a-bdb1-55f1ac137c7c0" Accept-Ranges: bytes Content-Length: 48561 Cache-Control: max-age=31104000 Expires: Fri, 22 Feb 2019 05:45:08 GMT Vary: Accept-Encoding    #出現這個提示表明已經啟用壓縮 Content-Type: image/jpeg

8、Apache服務日志輪詢配置(安裝配置cronolog)

Apache服務安裝后,默認有自己的日志服務,現在一般生產環境不太常用默認的日志服務

默認日志服務如下

[root@localhost1 bin]# ll total 3776 -rwxr-xr-x 1 root root 75861 Feb 26 17:10 ab -rwxr-xr-x 1 root root 3425 Feb 26 17:08 apachectl -rwxr-xr-x 1 root root 6986 Feb 26 17:10 apr-1-config -rwxr-xr-x 1 root root 6601 Feb 26 17:10 apu-1-config -rwxr-xr-x 1 root root 22652 Feb 26 17:08 apxs -rwxr-xr-x 1 root root 12269 Feb 26 17:10 checkgid -rwxr-xr-x 1 root root 8925 Feb 26 17:08 dbmmanage -rw-r--r-- 1 root root 1071 Feb 26 17:08 envvars -rw-r--r-- 1 root root 1071 Feb 26 17:08 envvars-std -rwxr-xr-x 1 root root 45328 Feb 26 17:10 htcacheclean -rwxr-xr-x 1 root root 30347 Feb 26 17:10 htdbm -rwxr-xr-x 1 root root 22476 Feb 26 17:10 htdigest -rwxr-xr-x 1 root root 31665 Feb 26 17:10 htpasswd -rwxr-xr-x 1 root root 3497167 Feb 26 17:10 httpd -rwxr-xr-x 1 root root 20180 Feb 26 17:10 httxt2dbm -rwxr-xr-x 1 root root 22937 Feb 26 17:10 logresolve -rwxr-xr-x 1 root root 24964 Feb 26 17:10 rotatelogs  #默認日志服務 查看服務安裝是否成功 [root@Centos cronolog-1.6.2]# ls /usr/local/sbin/ cronolog cronosplit 編輯主配置文件修改日志配置 [root@Centos cronolog-1.6.2]# vi /application/apache/conf/extra/httpd-vhosts.conf #port bash name <VirtualHost *:80> ServerAdmin admini@abc.com DocumentRoot "/data/www/bbs" ServerName bbs.abc.com ServerAlias bbs.com ErrorLog "logs/bbs-error_log" #CustomLog "logs/bbs-access_log" common#注釋掉原來的配置,新增下面一行配置 CustomLog "|/usr/local/sbin/cronolog /application/apache/logs/bbs-access_%d.log" combined #按天來輪詢日志信息 "/application/apache2.4.23/conf/extra/httpd-vhosts.conf" 43L, 1397C written 檢查語法與重啟服務 [root@Centos cronolog-1.6.2]# /application/apache/bin/apachectl -t Syntax OK [root@Centos cronolog-1.6.2]# /application/apache/bin/apachectl graceful 1、 查看日志信息 進入日志記錄的目錄查看 [root@Centos cronolog-1.6.2]# cd /application/apache/logs/ [root@Centos logs]# ll total 204 -rw-r--r--. 1 root root 3255 Sep 20 03:44 access_log -rw-r--r--. 1 root root 68367 Sep 23 08:35 bbs-access_log -rw-r--r--. 1 root root 79370 Sep 23 08:35 bbs-error_log -rw-r--r--. 1 root root 2315 Sep 23 07:38 blog-access_log -rw-r--r--. 1 root root 0 Sep 23 06:31 blog-error_log -rw-r--r--. 1 root root 32632 Sep 23 08:52 error_log -rw-r--r--. 1 root root 5 Sep 23 08:52 httpd.pid 上面是原來的日志目錄內容,接下來我們訪問站點看看目錄內容會不會有變化 249 / 753 [root@Centos logs]# ll total 212 -rw-r--r--. 1 root root 3255 Sep 20 03:44 access_log -rw-r--r--. 1 root root 1788 Sep 23 09:00 bbs-access_23.log -rw-r--r--. 1 root root 68367 Sep 23 08:35 bbs-access_log -rw-r--r--. 1 root root 81482 Sep 23 09:00 bbs-error_log -rw-r--r--. 1 root root 2315 Sep 23 07:38 blog-access_log -rw-r--r--. 1 root root 0 Sep 23 06:31 blog-error_log -rw-r--r--. 1 root root 33503 Sep 23 09:00 error_log -rw-r--r--. 1 root root 5 Sep 23 09:00 httpd.pid 表明配置是正確的,訪問站點后會自動生成以天為單位的日志文件 [root@Centos logs]# date -s '09/24/16' Sat Sep 24 00:00:00 CST 2016 [root@Centos logs]# ll total 220 -rw-r--r--. 1 root root 3255 Sep 20 03:44 access_log -rw-r--r--. 1 root root 1788 Sep 23 09:00 bbs-access_23.log -rw-r--r--. 1 root root 894 Sep 24 00:00 bbs-access_24.log -rw-r--r--. 1 root root 68367 Sep 23 08:35 bbs-access_log -rw-r--r--. 1 root root 82538 Sep 24 00:00 bbs-error_log -rw-r--r--. 1 root root 2315 Sep 23 07:38 blog-access_log -rw-r--r--. 1 root root 0 Sep 23 06:31 blog-error_log -rw-r--r--. 1 root root 33503 Sep 23 09:00 error_log -rw-r--r--. 1 root root 5 Sep 23 09:00 httpd.pid 修改時間后,目錄會自動生產一個日志文件 2、 日志記錄的信息 [root@Centos logs]# tail -f /application/apache/logs/bbs-access_24.log 192.168.1.200 - - [24/Sep/2016:00:00:18 +0800] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" 192.168.1.200 - - [24/Sep/2016:00:00:19 +0800] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" 目前是六行信息,我們在客戶端刷新網頁看看變化 [root@Centos logs]# tail -f /application/apache/logs/bbs-access_24.log 192.168.1.200 - - [24/Sep/2016:00:00:18 +0800] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" 250 / 753 192.168.1.200 - - [24/Sep/2016:00:00:19 +0800] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" 192.168.1.200 - - [24/Sep/2016:00:14:02 +0800] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)" 192.168.1.200 - - [24/Sep/2016:00:14:05 +0800] "GET / HTTP/1.1" 403 209 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) 刷新兩次就會增加兩行的日志記錄,信息里說明有:客戶端地址、訪問時間、協議、客戶端系統版本、瀏覽器

9、Apache服務優化配置

(1)修改默認配置用戶

Apache默認用戶是deamon

[root@localhost1 logs]# egrep "User|Group" /opt/apache/conf/httpd.conf # User/Group: The name (or #number) of the user/group to run httpd as. User apache Group apacheLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedLogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # User home directories

(2)錯誤頁面修改

[root@Centos ~]# grep "Error" /application/apache/conf/httpd.conf # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> ErrorLog "logs/error_log" #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html # ErrorDocument 404 http://www.abc.com 跳轉到指定頁面 #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html:

(3)使用worker模式

編譯安裝時已經使用worker模式,提高并發

(4)屏蔽Apache版本信息

修改 httpd.conf 文件,打開模塊 [root@Centos conf]# cat /application/apache/conf/httpd.conf|grep httpd-default #Include conf/extra/httpd-default.conf 修改成 Include conf/extra/httpd-default.conf [root@Centos conf]# sed -i 's#\#Include conf/extra/httpd-default.conf#Include conf/extra/httpd-default.conf#g' //application/apache/conf/httpd.conf [root@Centos conf]# cat /application/apache/conf/httpd.conf|grep httpd-default Include conf/extra/httpd-default.conf [root@Centos conf]# ../bin/apachectl -t Syntax OK [root@Centos conf]# ../bin/apachectl graceful [root@Centos apache]# egrep -v "^.*#|^$" ./conf/extra/httpd-default.conf Timeout 60 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 UseCanonicalName Off AccessFileName .htaccess ServerTokens Full-----------------------------------------------> ServerTokens Prod ServerSignature On---------------------------------------------> ServerSignature Off HostnameLookups Off <IfModule reqtimeout_module> RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 </IfModule>

(5)禁止目錄瀏覽權限

</IfModule> <Directory "/data/www/blog"> Options Indexes FollowSymLinks #修改成 OptionsFollowSymLinks AllowOverride None Require all granted </Directory>

(6)禁止用戶覆蓋(重載)

</IfModule> <Directory "/data/www/blog"> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

(7)開啟Apache防盜鏈功能

此功能是為了其它用戶使用站點中的文件,但是不是下載到本地然后上傳到 B 網站,而是直接使用文件的鏈接, 所以當別的用戶訪問這個鏈接時,其實真正訪問的不是 B 網站,而是我們的站點服務器,一旦這種流量增加, 就會增加服務器的負載,所以這也是優化的重要參數之一 首先在/application/apache/conf/httpd.conf 文件里打開如下模塊 LoadModule rewrite_module modules/mod_rewrite.so <IfModule rewrite_module > RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.abc.com.org/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.abc.com.org$ [NC] RewriteCond %{HTTP_REFERER} !^ abc.com.org/.*$ [NC] </IfModule> 優化的參數太多,具體應用還得實際生產環境的需求

(8)禁止PHP解析指定站點的目錄

<Directory "/data/www/blog"> Options Indexes FollowSymLinks AllowOverride None Require all granted php_flag engine off #防止上傳 PHP 木馬文件,遠程執行 </Directory>

?

轉載于:https://www.cnblogs.com/caicairui/p/8477880.html

總結

以上是生活随笔為你收集整理的LAMP之Apache的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

亚洲免费在线观看视频 | 在线免费观看国产黄色 | 99热999| av中文国产 | 国产剧情亚洲 | 麻豆传媒在线视频 | 色99色| 亚洲成年人在线播放 | 久操97| 天天插日日插 | 一区视频在线 | 999久久久久久久久久久 | 午夜在线免费观看视频 | 国产成人久久精品一区二区三区 | 在线观看免费观看在线91 | 午夜性色| 婷婷久久国产 | 国产精品免费观看在线 | 黄色成人在线观看 | 久久免费看a级毛毛片 | 国产精品综合久久久久久 | 国产大尺度视频 | 91丨九色丨高潮丰满 | 热久久免费国产视频 | 中文字幕在线播放视频 | 丁香在线观看完整电影视频 | 麻豆精品视频在线 | 日本中文字幕视频 | 久精品视频在线 | 激情六月婷婷久久 | 91大神精品视频 | 国产成人61精品免费看片 | 2024国产精品视频 | 国产成人av网站 | 91超级碰碰 | av大全在线看 | www在线免费观看 | 在线视频手机国产 | 久久国产视频网站 | 国产精品成人在线 | 欧美不卡视频在线 | 一级黄色片在线免费观看 | 韩日色视频 | 国际精品网 | 97夜夜澡人人爽人人免费 | 一区二区视频在线播放 | 精品国产123| 美女网站在线看 | 91激情视频在线 | 久久久久久久久久国产精品 | 日韩在线视频一区二区三区 | av高清一区二区三区 | 99re国产| 国精产品一二三线999 | 九九热在线视频 | 免费影视大全推荐 | 久久久久激情 | 日韩中文字幕第一页 | 久久久精品99 | 久久影院亚洲 | 久久久久久综合 | 国产色女 | 在线免费观看欧美日韩 | 黄色免费网 | 在线观看av免费观看 | 综合精品久久 | 免费看成人 | 国产高清永久免费 | 久久久精品久久日韩一区综合 | 欧美久草在线 | 91视频麻豆视频 | 九九热只有精品 | 在线精品一区二区 | 欧美一区,二区 | 最新国产精品久久精品 | 美女视频黄频大全免费 | 91在线日本 | 在线视频中文字幕一区 | 99热在线观看免费 | 日韩在线观看精品 | 亚洲永久精品国产 | 免费黄色特级片 | 免费在线中文字幕 | 久久66热这里只有精品 | 中文字幕一区二区三区乱码不卡 | 五月综合婷 | 国产一区二区在线视频观看 | 天天色天天上天天操 | 97精品一区 | 国产精品一区二区久久精品 | 一区二区三区高清不卡 | 日本中文字幕视频 | 亚洲清纯国产 | 亚洲精品视频免费在线 | 91在线免费视频 | 精品欧美一区二区三区久久久 | 在线 国产 日韩 | 久久久久久综合网天天 | 一区二区三区四区精品视频 | 韩国av不卡 | 欧美孕交vivoestv另类 | 99热这里只有精品8 久久综合毛片 | 一区 二区 精品 | 亚洲无吗天堂 | 麻豆成人精品视频 | 欧美日韩精品在线一区二区 | 亚洲电影院| 日韩激情久久 | 亚洲精品乱码久久久久久蜜桃91 | 久久线视频 | 久久成人视屏 | 国产中文字幕一区 | 国产精品成人品 | 中文字幕av在线不卡 | 国产精品mm | 久久人人爽人人爽人人 | 一区二区三区在线不卡 | 亚洲精品在线免费看 | 国产午夜精品一区二区三区欧美 | 久久理论电影网 | 高清av在线 | 日本久久精品视频 | 九九热精品在线 | 日本中文字幕视频 | 国产亚洲精品福利 | 国产精品久久在线观看 | 亚洲黄色免费网站 | 色综合天天天天做夜夜夜夜做 | 色综合天天爱 | 在线观看的a站 | 中文字幕观看av | 国产黄在线 | 亚洲不卡在线 | 91av网站在线观看 | 不卡在线一区 | 蜜臀av.com | av不卡免费看 | 五月婷婷色播 | 日日夜夜免费精品 | 美女黄网站视频免费 | 国产一区二区久久精品 | 精品亚洲成a人在线观看 | 久久久久亚洲精品成人网小说 | 久久大片网站 | 欧美一区二区三区不卡 | 在线日韩中文字幕 | 韩日精品在线 | 狠狠伊人 | 成人免费观看视频大全 | 欧美综合在线观看 | 国产午夜三级一二三区 | 91精品人成在线观看 | 日韩 精品 一区 国产 麻豆 | 中文字幕在线看视频国产 | 99精品国产一区二区三区麻豆 | 又污又黄的网站 | 日韩中文久久 | a色视频| 91免费在线播放 | 国产美女视频网站 | 日韩av资源站 | 久久综合欧美 | 久久噜噜少妇网站 | 成人在线视频网 | 亚洲视频 视频在线 | 美女视频黄,久久 | 欧美日韩国产在线观看 | 91热爆视频 | 日本久久久亚洲精品 | 精品视频123区在线观看 | 91网在线| 91在线在线观看 | 国内视频在线观看 | 美女久久久 | 精品中文字幕在线 | 欧美大香线蕉线伊人久久 | av成人免费在线观看 | 成人国产精品久久久 | 日韩中文字幕免费看 | 99精品国自产在线 | 五月综合网站 | 国产成人久久久久 | 国产精品女同一区二区三区久久夜 | 色资源在线 | 精品国产区在线 | www.com.黄| 久久怡红院 | 久久久久久久久久久免费视频 | 91精品免费在线视频 | 精品免费在线视频 | 国产成人一区二区在线观看 | 国产精品美女久久 | 成人在线免费视频观看 | 99这里只有精品视频 | 国产96精品 | www.五月天婷婷.com | 成人在线观看免费 | 色偷偷88888欧美精品久久 | 国产a视频免费观看 | 日韩欧美视频在线观看免费 | 日韩av一区二区在线影视 | 久久综合国产伦精品免费 | 久久99亚洲精品 | 亚洲精品影视在线观看 | 色综合天天色综合 | 欧美人人爱 | 久久精品国产免费看久久精品 | 久久免费播放视频 | 蜜臀av免费一区二区三区 | av看片在线 | 黄影院| 久久国产手机看片 | 91麻豆免费看 | 久久精品欧美 | 狠狠gao| 日韩在线视频网 | 日韩精品不卡在线观看 | 婷婷www | av在线免费在线 | bbbbb女女女女女bbbbb国产 | 激情综合网色播五月 | 丁香激情综合 | 成人免费网站在线观看 | 性色av免费看 | 国产精品九九视频 | 日本激情视频中文字幕 | 色姑娘综合天天 | 亚洲,播放 | 天天透天天插 | 国产色综合 | 丁香婷婷在线观看 | 中文字幕a在线 | 日本中文字幕网址 | 九九免费精品视频在线观看 | 天堂在线视频免费观看 | 久久人人97超碰国产公开结果 | 国产高h视频 | 日韩在线一级 | 最新不卡av | 成人欧美在线 | 久久人人爽人人片 | 天堂av在线网址 | 亚洲天堂精品视频在线观看 | 久久精品久久久精品美女 | 国产视频美女 | 久热色超碰 | 久久精品麻豆 | 看全黄大色黄大片 | 国产极品尤物在线 | 三级av免费看 | 国产精品网红直播 | 婷婷综合五月天 | 日韩免费观看一区二区三区 | 三级黄色大片在线观看 | 一区二区视频在线观看免费 | 99九九视频 | 国产在线精品一区二区不卡了 | 久99久精品视频免费观看 | 日韩影视大全 | 99视频在线精品免费观看2 | 在线观看 亚洲 | 国产中文欧美日韩在线 | 久久激情网站 | 香蕉免费| 国产精品久久久久高潮 | 日韩欧美一区二区三区黑寡妇 | 国产精品成人自产拍在线观看 | 日本中文字幕久久 | 日韩在线播放视频 | 九色精品免费永久在线 | 黄色av成人在线观看 | 色黄久久久久久 | 久章操| 麻豆国产精品一区二区三区 | 青青草在久久免费久久免费 | 日本狠狠色 | 久久精品久久精品久久 | 亚洲精品一区二区精华 | 亚洲成人av一区 | 六月丁香激情综合 | av专区在线 | avv天堂| 国产精品视频全国免费观看 | 五月婷婷中文网 | 激情欧美一区二区免费视频 | 97国产一区二区 | 色资源中文字幕 | 丁香午夜婷婷 | 人人涩| 国产成人av电影在线 | 青青河边草免费观看 | 96精品在线| 在线播放精品一区二区三区 | 亚洲欧洲国产精品 | 亚洲国产精品久久久久婷婷884 | 久久久久久久久久久影院 | 成人a免费| 国产成人亚洲在线电影 | 国产精品福利在线观看 | 久久亚洲欧美 | 亚洲一级理论片 | 欧美日本不卡高清 | 欧美激情视频免费看 | 成人香蕉视频 | 在线观看精品视频 | 一二三区av | 91麻豆操 | 天堂网一区二区三区 | 视频三区在线 | 人人澡人| 亚洲精品中文字幕在线 | 美女久久久久久久久久久 | 久久综合之合合综合久久 | 精品亚洲va在线va天堂资源站 | 97成人在线视频 | 免费黄色激情视频 | 在线观看黄色的网站 | 国产精品视频你懂的 | 超碰人人干人人 | 国产黄在线 | 色精品视频 | 国产又黄又爽又猛视频日本 | 国产精品99久久久久久人免费 | 天天摸天天舔 | 麻豆视频在线观看 | 久久爽久久爽久久av东京爽 | 国产一区二区免费在线观看 | 久久久视屏 | 天天天操操操 | 天天天天色综合 | 亚洲精品一区二区在线观看 | 亚洲视频久久久久 | 97视频在线播放 | 日韩毛片在线一区二区毛片 | 欧美a在线免费观看 | a级片网站 | 欧美天天射 | 日韩午夜视频在线观看 | 最近日本韩国中文字幕 | av大片网址 | 欧美日韩亚洲在线 | 天天色天天爱天天射综合 | 久青草电影| 在线国产日韩 | 亚洲精品1区2区3区 超碰成人网 | 精品国产一区二区三区av性色 | 国内亚洲精品 | 国产精品18久久久久久久久久久久 | 中文字幕亚洲欧美日韩2019 | 国产精品久久久久9999吃药 | 亚洲伊人婷婷 | 伊人狠狠色 | 国产国语在线 | 色综合天天综合在线视频 | 国产精品第7页 | 国产手机在线视频 | 成人av影视观看 | 永久免费的av电影 | 一本—道久久a久久精品蜜桃 | 免费网站色| 天天插狠狠插 | 亚洲一级免费观看 | 91在线视频在线观看 | 久久xx视频 | 国产精品黄网站在线观看 | 一区二区不卡高清 | 国产香蕉视频 | av在线成人 | 国产小视频91 | 欧美射射射 | 国产在线观看一区 | 日韩激情视频 | 亚洲v欧美v国产v在线观看 | 日本天天色 | 国内精品视频久久 | 色99之美女主播在线视频 | 亚洲影院一区 | 国产午夜影院 | 久草久草视频 | 黄色一级大片在线免费看国产一 | 国产精品国产三级国产不产一地 | 国产免费午夜 | 欧美日韩另类在线观看 | 久久亚洲欧美日韩精品专区 | 特黄免费av | 在线 日韩 av | 久久9999久久免费精品国产 | 国产老熟 | 99草视频在线观看 | 亚州精品在线视频 | 色综合天天 | 亚洲天堂免费视频 | 国产精品自在线拍国产 | 9幺看片| 欧美性天天 | 91丨九色丨国产丨porny精品 | 99精品成人 | 久草免费在线观看 | 婷婷在线网站 | 国内精品久久久久影院优 | 久久久久久久久久久免费av | 成人午夜电影在线 | 国产精品久久久久久久久久不蜜月 | 国产中文字幕久久 | 中文字幕在线观看资源 | 亚洲国产精品第一区二区 | 人人插人人插 | 日本一区二区高清不卡 | 日韩电影在线看 | 992tv在线观看网站 | 日韩在线观看精品 | 久久精品二区 | 国产成人黄色在线 | 亚洲国产中文在线 | 国产亚洲精品久久 | 国产精品av免费 | 色资源网免费观看视频 | 成人影片在线免费观看 | 我要看黄色一级片 | 亚洲爱爱视频 | 天天色棕合合合合合合 | 少妇做爰k8经典 | 亚洲欧美观看 | 日韩在线视频二区 | 日韩色中色 | 久精品视频免费观看2 | 亚洲成人av片在线观看 | 亚洲黄色一级视频 | 国产精品女人久久久久久 | 免费在线观看亚洲视频 | 字幕网av| 国产毛片久久 | 中文字幕电影在线 | 97精品国产一二三产区 | 国产伦精品一区二区三区免费 | 精品国产一区二区三区久久久蜜臀 | 日本中文字幕高清 | 久草在线在线精品观看 | 国产精品不卡av | 很黄很色很污的网站 | 国产精品美女网站 | 美女视频黄频大全免费 | 国产精品亚洲成人 | av九九| www.五月天| 免费在线看v | 丁香色天天 | 天天综合狠狠精品 | 日韩欧美在线一区二区 | 欧美在线aaa| 欧美最猛性xxxxx亚洲精品 | 久久精品在线 | 中文av日韩 | 激情五月激情综合网 | av中文字幕不卡 | 在线av资源| 国产96精品 | 91在线入口| 久久综合九九 | 亚洲综合小说 | 日韩在线欧美在线 | 一区 在线 影院 | 中文字幕在线观看视频一区 | 在线观看va | 日日成人网 | 色狠狠一区二区 | 男女激情片在线观看 | 色婷婷激情电影 | 亚洲精品国产品国语在线 | 欧洲激情综合 | 超碰在线个人 | 久久久麻豆视频 | 国产馆在线播放 | 久久久久免费看 | 天天操天天射天天添 | 久久激情婷婷 | 天天操网 | 欧美老人xxxx18| 黄色a级片在线观看 | 天天做夜夜做 | 国产一区二区不卡视频 | 中文字字幕在线 | av性网站 | 丝袜美腿亚洲综合 | 久久九九久久精品 | 欧美精品v国产精品v日韩精品 | 99精品久久久久久久 | 欧美激情xxxx性bbbb | 91av播放 | 色视频一区 | 99热手机在线观看 | 国产精品资源 | 国产精品久久一 | 欧美在线aa | 精品国偷自产在线 | av免费成人| 日韩在线不卡视频 | 日日夜夜中文字幕 | 日韩在线一二三区 | 国产精品毛片久久蜜 | 在线看免费 | 久草在线免费在线观看 | 久久亚洲福利视频 | 久久亚洲人 | 西西444www大胆高清视频 | 久久免费一级片 | 精品少妇一区二区三区在线 | 五月开心激情 | 欧美性黑人 | 午夜黄色一级片 | 亚洲女人av | 91亚洲国产成人久久精品网站 | 激情综合五月婷婷 | 成人午夜剧场在线观看 | 久久久免费电影 | 国产成人一区二区三区在线观看 | 91在线看 | 亚洲精品自拍视频在线观看 | 国产高清无av久久 | 69久久99精品久久久久婷婷 | 五月综合网 | 99热这里只有精品免费 | 看国产黄色片 | 蜜桃视频在线观看一区 | 成人观看视频 | 99国产情侣在线播放 | 在线99| 欧美日韩国产欧美 | 在线免费亚洲 | 色偷偷88888欧美精品久久久 | 中文字幕综合在线 | 国产视频日韩 | 日韩精品2区 | 九九在线视频 | 麻豆传媒电影在线观看 | 成人在线免费小视频 | aaawww | 亚洲久在线 | 精品视频在线免费 | 国产玖玖视频 | 婷婷色综 | 碰超在线 | 在线视频 精品 | 亚洲国产精品va在线 | 免费在线观看一区 | 伊人久久av| 亚欧洲精品视频在线观看 | 国产一区二区久久精品 | 在线视频 91| 久久这里只有精品久久 | 久久综合欧美精品亚洲一区 | 亚洲精品女 | 国产精品一区二区三区在线看 | 亚洲精品美女 | 亚洲一区天堂 | 最近日韩中文字幕中文 | 天天弄天天操 | 日韩精品一区在线观看 | 99se视频在线观看 | 久久精品看片 | 国产精品久久一区二区三区不卡 | 在线观看韩日电影免费 | 日韩高清一 | 亚洲成人精品av | 91av视频免费在线观看 | 成人黄色电影在线播放 | 天天操操| 99精品视频免费在线观看 | 一区电影| 日韩影视大全 | 免费在线成人av电影 | av成人动漫| 中文字幕在线观看视频一区 | 国产成人精品免费在线观看 | 国产精品久久久久久久久大全 | 成人9ⅰ免费影视网站 | 97超碰国产精品 | 国产黄色大片 | 久久精视频 | 天天操天天射天天爱 | 欧美在线你懂的 | 中国一级特黄毛片大片久久 | 三级视频片 | 五月天.com| 国产网站在线免费观看 | 51久久成人国产精品麻豆 | 免费看的毛片 | 2023av| 亚洲人天堂 | 月丁香婷婷| 日本三级中文字幕在线观看 | 香蕉视频免费看 | 久久久麻豆精品一区二区 | 国产精品xxxx18a99 | 国产视频手机在线 | 久久五月天色综合 | 欧洲黄色片 | 国产精品成人久久久久久久 | 一级电影免费在线观看 | 亚洲理论视频 | 九九免费观看视频 | 午夜精品一区二区三区四区 | 国内精品久久久精品电影院 | 日韩69av | 丁香影院在线 | 91免费在线播放 | 国产三级精品三级在线观看 | 在线观看成人av | 又黄又爽又刺激的视频 | a久久久久久 | 91插插插网站 | 亚洲最大色 | 国产精品专区h在线观看 | 狠狠色噜噜狠狠狠狠2021天天 | 亚洲午夜久久久久 | 日韩欧美一区二区三区黑寡妇 | 一级黄色片在线免费观看 | 国产三级国产精品国产专区50 | 黄色亚洲大片免费在线观看 | 99久久www免费 | 大胆欧美gogo免费视频一二区 | av 在线观看 | 欧美少妇影院 | 日日爱夜夜爱 | 永久av免费在线观看 | 91亚洲精品久久久中文字幕 | 久久免费视频网站 | www.91成人 | 99在线热播精品免费99热 | 亚洲视频一区二区三区在线观看 | 狠狠狠的干 | av免费在线免费观看 | 国产成人精品在线播放 | 国产精品黑丝在线观看 | 久久综合九色综合欧美狠狠 | 国产精品高清免费在线观看 | 天天躁天天躁天天躁婷 | 欧美日韩久 | 国内久久精品视频 | 久久久国产精品免费 | 天天干国产 | 色网站在线免费观看 | 国产一级片一区二区三区 | 91成人免费电影 | 日韩在线观看免费 | 在线免费观看麻豆视频 | 中文字幕在线观看91 | 久久久久久免费毛片精品 | 日本在线观看一区二区 | 91精品国产成人观看 | www日韩欧美 | 成人看片 | 国产精品正在播放 | 一区二区三区 亚洲 | 色天天综合网 | 狠狠狠狠狠狠干 | 中文字幕在线观看91 | 在线av资源| 九七人人干 | 国产手机视频在线观看 | 69国产精品视频 | 久久人人爽人人片 | 成人免费观看视频网站 | 99热超碰在线 | 国产成人一区二区三区在线观看 | 日韩城人在线 | 91热精品视频| 久久久免费毛片 | 黄网站免费久久 | 在线免费观看黄色小说 | 久久极品| 91麻豆精品国产自产 | 亚洲精品永久免费视频 | 亚洲视频1区2区 | 国产91精品一区二区 | 黄色国产高清 | 精品一区电影 | 亚洲黄色三级 | 黄色大全免费网站 | 四虎影视av| 久久看看| 99色在线视频 | 色婷婷综合久久久中文字幕 | 日韩免费精品 | 成人毛片一区二区三区 | 亚洲精品中文字幕在线 | 欧美日韩在线观看一区二区三区 | 伊人色**天天综合婷婷 | 久久精品久久综合 | 亚洲欧美国内爽妇网 | 成人91在线| 国产福利精品在线观看 | 日韩av一区二区三区四区 | 黄影院| 国内精品福利视频 | 欧美精彩视频 | 欧美性生爱 | 国产成人精品一二三区 | 美女视频黄在线 | 又黄又爽又刺激的视频 | 444av| 狠狠色综合网站久久久久久久 | 亚洲三级av | 久久99国产精品 | 久久人人97超碰国产公开结果 | 嫩草伊人久久精品少妇av | 99精品欧美一区二区三区 | 日韩精品一区二区三区第95 | 天天摸天天操天天爽 | 97色在线观看免费视频 | 国产精品免费一区二区三区在线观看 | 亚洲aⅴ久久精品 | 免费久久网 | 午夜在线免费观看视频 | 九九免费在线观看视频 | 九九色综合| 日韩xxxbbb | www视频在线免费观看 | www.五月天婷婷 | 国产精品久久久777 成人手机在线视频 | 四虎国产永久在线精品 | 99在线精品免费视频九九视 | 欧美a级在线 | 色欧美88888久久久久久影院 | 国产美女网 | 婷婷色综 | 午夜影院在线观看18 | 欧美日韩高清免费 | 亚洲日韩精品欧美一区二区 | 久久99国产精品自在自在app | 在线观看激情av | 免费在线观看av不卡 | 精品国产一区二区三区四 | 中文字幕免费高清在线 | 一区二区三区四区不卡 | 亚洲精品美女久久久久网站 | 999视频在线观看 | 一区三区视频在线观看 | 久久综合偷偷噜噜噜色 | 国产日韩欧美在线一区 | av网站大全免费 | 一级黄色片在线免费看 | 亚洲精品在线免费观看视频 | 制服丝袜欧美 | 久久久久久久久久网站 | 最新超碰 | 在线观看视频一区二区三区 | 欧美一区日韩精品 | 久久久久久久影院 | 久久久精品一区二区三区 | 激情六月婷婷久久 | 久久天堂影院 | 午夜精品福利一区二区三区蜜桃 | 成人avav | 欧美最猛性xxxxx亚洲精品 | 96久久| 天天草天天干天天 | 国产精品 日韩 欧美 | 特级毛片网站 | 九九九九精品 | 成人午夜在线电影 | 国产精品99久久久久久人免费 | 国内精品中文字幕 | 狠狠干成人综合网 | 91精品影视 | www色,com| 国产毛片久久久 | 欧美午夜久久久 | 欧美另类一二三四区 | 2019天天干夜夜操 | 九月婷婷综合网 | 欧美激情视频一区二区三区免费 | 国产小视频在线观看 | 国产美女久久久 | 中文超碰字幕 | 成人在线电影观看 | 亚洲精品国产精品国自产在线 | 视频一区视频二区在线观看 | 久草在线最新免费 | 狠狠色丁香婷婷综合基地 | 手机看片久久 | 久久99精品国产99久久 | 欧美一级视频免费看 | 天天插天天 | 成人观看视频 | 在线岛国av| 91香蕉视频在线下载 | 午夜精品一区二区三区四区 | 欧美最猛性xxxxx免费 | 美女精品在线观看 | 精品国产1区2区 | 国产成人一区二 | 97在线视频免费看 | 在线国产激情视频 | 欧美日韩中文另类 | 国产精品一区欧美 | 99久久婷婷国产一区二区三区 | 国产精品s色| 亚洲欧洲成人精品av97 | 日本特黄一级 | 日韩两性视频 | 午夜国产在线 | 国内偷拍精品视频 | 视频一区二区三区视频 | 99久久精品午夜一区二区小说 | 亚洲国产成人av网 | www.av小说| 亚洲永久国产精品 | 国产成人精品综合久久久久99 | 五月天天天操 | 四虎国产永久在线精品 | 欧美日韩国产在线一区 | 日韩精品久久一区二区 | 亚洲激情综合 | 91精品视频免费 | 日韩av中文在线观看 | 伊人久久影视 | 国产精品99久久久久久久久 | 国产欧美久久久精品影院 | 国产又粗又猛又爽 | 国产婷婷在线观看 | 91精品久久久久久粉嫩 | 精品国产视频一区 | 免费精品久久久 | 中文字幕观看在线 | 91看片在线 | 麻豆久久一区二区 | 免费观看性生活大片 | 国产精品久久久久久久久久久久午夜 | 精品1区2区3区 | 日韩av在线一区二区 | 最近中文字幕大全 | 天堂在线视频中文网 | 正在播放五月婷婷狠狠干 | 久久成年视频 | 久草在线视频精品 | www四虎影院| 亚洲综合国产精品 | 色综合久久久久综合体桃花网 | 国产一性一爱一乱一交 | 国产偷国产偷亚洲清高 | 亚洲欧美视频在线播放 | 黄色片免费看 | 综合久久一本 | 久久人人爽人人爽 | 99在线观看精品 | 九热精品 | 国产精品毛片久久久久久久久久99999999 | 伊人婷婷网 | 日韩大陆欧美高清视频区 | 精品av网站 | 91成人免费在线视频 | 欧美日韩亚洲在线观看 | 午夜成人影视 | 免费在线黄色av | 九九九九精品九九九九 | 国产精品久久一区二区三区, | 国产精品久久久久一区二区 | 人人爽人人插 | 国产呻吟在线 | 天天天操天天天干 | 精品一区精品二区 | 激情伊人五月天 | 999成人| 日韩av在线看 | 免费网站在线 | 五月婷婷.com | 99在线精品观看 | 不卡国产视频 | 91在线中文 | 天天色官网 | 国产美女主播精品一区二区三区 | 亚洲精品久久久久久久不卡四虎 | 五月婷婷另类国产 | 婷婷激情小说网 | 五月天久久久久 | 999成人| 国产高清视频色在线www | 亚洲精品高清一区二区三区四区 | 久久久男人的天堂 | 国产高清在线一区 | 黄色精品在线看 | 色综合天天干 | 久久久久久久久久久免费视频 | 美女网站在线免费观看 | 99精品视频99 | 在线视频国产区 | 最近久乱中文字幕 | 久久精彩视频 | 中文字幕人成人 | 国内一级片在线观看 | 免费在线国产精品 | 国产精品大片在线观看 | 欧美另类一二三四区 | 日韩电影在线看 | 成人午夜久久 | 亚洲五月花 | 久久污视频 | 国产在线a| 黄色成人小视频 | 色婷婷婷 | 欧美日韩亚洲在线观看 | 亚洲日本一区二区在线 | 99视频在线精品 | 国产精品久久一区二区三区不卡 | 不卡av免费在线观看 | 欧洲在线免费视频 | 日本一区二区三区免费观看 | 韩日视频在线 | 精品视频在线播放 | 国产黄在线播放 | 极品久久久久 | 日韩在线观看视频中文字幕 | 亚洲日本中文字幕在线观看 | 超级碰碰碰碰 | 丝袜网站在线观看 | 国产成人精品一区二区三区福利 | 亚洲国产视频直播 | 欧美一级艳片视频免费观看 | 99视屏| 韩国在线一区二区 | 天天操天天操天天干 | 顶级欧美色妇4khd | 精品在线小视频 | 三上悠亚一区二区在线观看 | 亚洲精品va | 国产成人三级一区二区在线观看一 | www日韩视频 | 日韩一级黄色片 | 欧美污污网站 | 99热网站| 99久久精品久久久久久动态片 | 在线免费黄色 | 91在线中字 | 精品专区一区二区 | 91热精品 | 国产伦精品一区二区三区无广告 | 国产精品99视频 | 国内99视频 | 国产精品一区二区免费视频 | 国产精品com | 久久久久亚洲精品男人的天堂 | 嫩草av影院| 色多多视频在线观看 | 欧美成人h版电影 | 亚洲精品一区二区精华 | 美女性爽视频国产免费app | 婷婷六月色 | 福利片视频区 | 日日日网| 成人cosplay福利网站 | 激情久久一区二区三区 | 亚洲免费不卡 | 天天做综合网 | 免费观看一级特黄欧美大片 | 婷婷丁香色 | 91九色网址 | 久久99国产精品视频 | 97在线观看免费高清完整版在线观看 | 偷拍福利视频一区二区三区 | 韩国精品在线观看 | 欧美日韩在线视频一区二区 | 精品一区 精品二区 | 久久综合久久综合九色 | 国产喷水在线 | 日韩黄视频 | 日韩av一区二区三区 | 亚洲高清91 | 久草99| 久久er99热精品一区二区三区 | 久久久国产一区二区 | 久久久久久久免费观看 | 美女网站视频免费都是黄 | 亚洲少妇自拍 | 一区二区在线影院 | 久久综合久久综合九色 | 夜夜躁狠狠燥 | 久久免费精彩视频 | 久久久污 | 久久精品亚洲 | 亚洲va韩国va欧美va精四季 | 国产污视频在线观看 | 五月综合久久 | 一本一道波多野毛片中文在线 | 99九九热只有国产精品 | 不卡av在线免费观看 | 色视频国产直接看 | 日韩三级在线 | 国产又粗又猛又色又黄视频 | 91成人精品一区在线播放69 | 国产盗摄精品一区二区 | 91精品在线观看入口 | 天天爱天天插 | 天天爱天天射 | 91在线观看视频网站 | 天堂在线成人 | 亚洲男男gaygay无套同网址 | 日韩电影一区二区在线 |