{"id":637,"date":"2018-03-01T14:48:26","date_gmt":"2018-03-01T06:48:26","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=637"},"modified":"2018-03-01T14:48:26","modified_gmt":"2018-03-01T06:48:26","slug":"%e5%a6%82%e4%bd%95%e5%a4%a7%e5%b9%85%e6%8f%90%e5%8d%87web%e5%89%8d%e7%ab%af%e6%80%a7%e8%83%bd%e4%b9%8b%e7%9c%8btengine%e5%9c%a8%e5%a4%a7%e5%85%ac%e5%8f%b8%e6%9e%b6%e6%9e%84%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=637","title":{"rendered":"\u5982\u4f55\u5927\u5e45\u63d0\u5347web\u524d\u7aef\u6027\u80fd\u4e4b\u770btengine\u5728\u5927\u516c\u53f8\u67b6\u6784\u5b9e\u8df5"},"content":{"rendered":"<p>http:\/\/www.cnblogs.com\/huangxincheng\/p\/7469328.html<\/p>\n<p>&nbsp;<\/p>\n<p>\u5728\u4e00\u4e2a\u9879\u76ee\u8fd8\u662f\u5355\u4f53\u67b6\u6784\u7684\u65f6\u5019\uff0c\u6240\u6709\u7684js\uff0ccss\uff0cimage\u90fd\u4f1a\u5728\u4e00\u4e2aweb\u7f51\u7ad9\u4e0a\uff0c\u770b\u8d77\u6765\u5e76\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u6bd4\u5982\u4e0b\u9762\u8fd9\u6837\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903094121937-1041725951.jpg\" alt=\"\" \/><\/p>\n<p>\u4f46\u662f\u5f53web\u7f51\u7ad9\u6d41\u91cf\u8d77\u6765\u7684\u65f6\u5019\uff0c\u8fd9\u4e2a\u5355\u4f53\u67b6\u6784\u5fc5\u987b\u8981\u8fdb\u884c\u6a2a\u5411\u6269\u5c55\uff0c\u800c\u5728\u539f\u6765\u7684\u67b6\u6784\u4e2d\u9759\u6001\u8d44\u6e90\u8fd9\u7f8a\u6bdb\u662f\u51fa\u5728\u5355\u4f53\u67b6\u6784\u8fd9\u5934\u7f8a\u8eab\u4e0a\uff0c\u6240\u4ee5\u6a2a\u5411\u591a\u5c11<\/p>\n<p>\u4e2a\u5355\u4f53\uff0c\u5c31\u6709\u591a\u5c11\u4e2a\u9759\u6001\u8d44\u6e90\u6587\u4ef6\u5939\uff0c\u6bd4\u5982\u4e0b\u9762\u8fd9\u6837\u7684\u67b6\u6784\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903095023327-1533529173.jpg\" alt=\"\" \/><\/p>\n<p>\u90a3\u8fd9\u79cd\u67b6\u6784\u6709\u4ec0\u4e48\u95ee\u9898\u5462\uff1f \u603b\u7684\u6765\u8bf4\u4f1a\u6709\u5982\u4e0b\u4e8c\u4e2a\u95ee\u9898\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>1. \u00a0 \u6d4f\u89c8\u5668\u5bf9\u5355\u4e00\u57df\u540d\u7684\u8bf7\u6c42\u6709\u5e76\u53d1\u9650\u5236\u3002<\/p>\n<p>\u5728\u540c\u4e00\u4e2a\u57df\u540d\u4e0b\uff0c\u4e00\u822c\u6765\u8bf4\u6709js\uff0ccss,img,media,html\u7b49\u7b49\u9759\u6001\u8d44\u6e90\uff0c\u5982\u679c\u8d44\u6e90\u90fd\u6302\u5728\u540c\u4e00\u4e2a\u57df\u540d\u4e0b\uff0c\u52bf\u5fc5\u4f1a\u5f71\u54cd\u9875\u9762\u7684\u52a0\u8f7d\u901f\u5ea6\uff0c\u800c\u4e14\u5355\u4e00\u57df\u540d<\/p>\n<p>\u4e0b\u9759\u6001\u8d44\u6e90\u8fd8\u4f1a\u5e26\u4e0a\u540c\u57df\u540d\u4e0b\u7684cookie\u7b49\u672c\u4e0d\u9700\u8981\u9644\u52a0\u7684\u4fe1\u606f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>2. \u00a0\u4e0d\u65b9\u4fbf\u7ba1\u7406\u548c\u8d44\u6e90\u7684\u6d6a\u8d39<\/p>\n<p>\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u8bf4\u5462\uff1f \u6211\u4eec\u77e5\u9053\u9759\u6001\u8d44\u6e90\u4e00\u822c\u6765\u8bf4\u90fd\u662f\u5f88\u5360\u8d44\u6e90\u7a7a\u95f4\u7684\uff0c\u5c24\u5176\u662f\u7528\u6237\u4e0a\u4f20\u7684\u5934\u50cf\uff0ccsv\u90a3\u66f4\u662f\u5360\u7528web\u670d\u52a1\u5668\u8d44\u6e90\uff0c\u4e3a\u4e86\u5e94\u5bf9\u7a81\u53d1\u60c5\u51b5\uff0c<\/p>\n<p>\u4e00\u822c\u4f1a\u4fdd\u6301web\u4ee3\u7801\u76843\u4e2a\u7248\u672c\u7684\u56de\u6eda\u7b56\u7565\uff0c\u4e5f\u5c31\u662f\u8bf4\u4f60\u9700\u8981\u5728web1\uff0cweb2\uff0cweb3\u4e0a\u540c\u65f6\u8fdb\u884c3\u4e2a\u9759\u6001\u8d44\u6e90\u6587\u4ef6\u5939\u7684copy\uff0c\u76f8\u6bd4\u5355\u72ec\u7528\u9759\u6001\u8d44\u6e90\u670d\u52a1<\/p>\n<p>\u5668\u7edf\u4e00\u7ba1\u7406\u7684\u6587\u4ef6\u5939\u7684\u60c5\u51b5\u5bf9\u6bd4\uff0c\u524d\u8005\u7684\u78c1\u76d8\u8d44\u6e90\u7684\u6d6a\u8d39\u53ef\u60f3\u800c\u77e5\u3002\u3002\u3002\u6240\u4ee5\u6539\u6b63\u540e\u7684\u67b6\u6784\u5e94\u8be5\u662f\u8fd9\u6837\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903104804530-403060643.jpg\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u6709\u4e9b\u540c\u5b66\u53ef\u80fd\u4f1a\u8bf4\uff0c\u7a7a\u53e3\u65e0\u51ed\uff0c\u4f60\u5f97\u627e\u70b9\u771f\u5b9e\u7684\u6848\u4f8b\u7ed9\u6211\u770b\u770b\uff0c\u4e3a\u4e86\u6ee1\u8db3\u4f60\u7684\u80c3\u53e3\uff0c\u4e0b\u9762\u6211\u5c31\u627e\u4e0b\u2018\u643a\u7a0b\u2019 \u548c \u2018\u6dd8\u5b9d\u2019\u7ad9\u70b9\u7ed9\u4f60\u5206\u4eab\u4e00\u4e0b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4e00\uff1a\u643a\u7a0b\u9996\u9875\u5bf9\u8fd9\u4e8c\u4e2a\u95ee\u9898\u7684\u89e3\u51b3<\/p>\n<p>\u5565\u4e5f\u4e0d\u60f3\u8bf4\uff0c\u901a\u8fc7\u6d4f\u89c8\u5668\u968f\u4fbf\u6293\u53d6\u4e00\u4e2acss\u6587\u4ef6\u7ed9\u5927\u5bb6\u5206\u4eab\u4e00\u4e0b\uff0c\u8be6\u7ec6\u5982\u4e0b\u56fe\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903101057593-1895466988.jpg\" alt=\"\" width=\"1025\" height=\"694\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>1. css\u7684\u52a0\u8f7d\u8def\u5f84<\/p>\n<p>\u4ecehttp:\/\/webresource.c-ctrip.com\/ResCRMOnline\/R5\/css\/index\/private_index.A_v3.css?ts=20170828_pro \u4e2d\u53ef\u4ee5\u770b\u5230\u8fd9\u548cwww.ctrip.com<\/p>\n<p>\u57df\u540d\u6839\u672c\u5c31\u4e0d\u662f\u4e00\u4e2a\u57df\u540d\uff0c\u9664\u4e86\u6709\u70b9\u50cf\uff0c\u4e0d\u8bf4\u8bdd\uff0c\u751a\u81f3\u8fd8\u6709\u70b9\u60f3\u7b11\uff0c\u6240\u4ee5\u8fd9\u79cd\u65b9\u5f0f\u7684\u52a0\u8f7d\u5bf9\u9875\u9762\u7684\u5feb\u901f\u5448\u73b0\u6709\u5f88\u5927\u7684\u5e2e\u52a9\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>2. \u5bf9R5\u7684\u5206\u6790<\/p>\n<p>\u8fd9\u4e2aR5\u662f\u4ec0\u4e48\u610f\u601d\uff0c\u5c31\u662f\u670910\u4e2a\u7248\u672c\uff0cR1-R10\uff0c\u6bcf\u53d1\u5e03\u4e00\u4e2a\u65b0\u7248\u672c\uff0cR++\uff0c\u8f6e\u56de\u800c\u5df2\uff0c\u6240\u4ee5\u4f60\u53ef\u4ee5\u5c06R5 -&gt; R6\uff0c\u90a3\u5c31\u662f\u8f6e\u56de\u4e4b\u524d\u7684css\u7248\u672c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903102211358-843378612.jpg\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u643a\u7a0b\u73b0\u5728\u7684\u9759\u6001\u8d44\u6e90\u5927\u90e8\u5206\u4e5f\u662f\u4f7f\u7528\u5230\u4e86tengine,\u8fd9\u662f\u4e00\u4e2a\u6dd8\u5b9d\u5f00\u6e90\u7684\u57fa\u4e8enginx\u7684proxy\u670d\u52a1\u5668\uff0c\u5728nginx\u4e0a\u9762\u505a\u4e86\u5f88\u591a\u7684\u4f18\u5316\uff0c\u800c\u4e14tengine\u5f88<\/p>\n<p>\u5927\u7684\u4e00\u4e2a\u4eae\u70b9\u5c31\u662f\u53ef\u4ee5\u4f7f\u7528\u591a\u6587\u4ef6\u5408\u5e76\u52a0\u8f7d\uff0c\u6bd4\u598210\u4e2acss\u6587\u4ef6\uff0c\u53ef\u4ee5\u5408\u5e76\u6210\u4e00\u4e2acss\u8fdb\u884c\u5448\u73b0\uff0c\u8fd9\u5c31\u8ba910\u4e2ahttp\u8bf7\u6c42\u53d8\u6210\u4e861\u4e2a\uff0c\u540c\u6837\u4e5f\u662f\u5bf9\u9875\u9762<\/p>\n<p>\u5feb\u901f\u5448\u73b0\u6709\u975e\u5e38\u5927\u7684\u5e2e\u52a9\uff0c\u5f88\u53ef\u60dc\u5728ctrip\u4e0a\u9762\u5e76\u6ca1\u6709\u627e\u5230\u5408\u5e76\u52a0\u8f7dcss,js\u7684\u6848\u4f8b\uff0c\u6216\u8bb8\u8fd8\u662f\u5386\u53f2\u7684\u539f\u56e0\u5427\uff0c\u90a3\u53ea\u80fd\u5728taobao\u5b98\u7f51\u4e0a\u627e\u4e00\u4e0b\u770b\u770b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903103213327-759120517.jpg\" alt=\"\" width=\"990\" height=\"559\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u4ece\u4e0a\u56fe\u4e2d\u53ef\u4ee5\u6e05\u695a\u770b\u5230tengine\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u5c06default-min.css \u548c apply-min.css \u8fdb\u884c\u4e86\u5408\u5e76\u52a0\u8f7d\uff0c\u5f88\u795e\u5947\u5427\uff0c\u63a5\u4e0b\u6765\u5206\u4eab\u4e00\u4e0btengine\u7684\u5b89\u88c5\u914d\u7f6e\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4e8c\uff1atengine\u5b89\u88c5<\/p>\n<p>1. \u00a0\u4e0b\u8f7d\u5730\u5740\uff1a<\/p>\n<p>\u53ef\u4ee5\u53bbtengine\u5b98\u7f51\uff08http:\/\/tengine.taobao.org\/\uff09\u4e0a\u627e\u5230\u76ee\u524d\u6700\u65b0\u7684 2.2.0\u7684\u5b89\u88c5\u5305\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903105230530-2041607189.jpg\" alt=\"\" \/><\/p>\n<div class=\"cnblogs_code\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre>[root@localhost myapp]# wget http:\/\/tengine.taobao.org\/download\/tengine-2.2.0.tar.gz\n--2017-09-02 19:54:07--  http:\/\/tengine.taobao.org\/download\/tengine-2.2.0.tar.gz\nResolving tengine.taobao.org (tengine.taobao.org)... 120.55.149.135\nConnecting to tengine.taobao.org (tengine.taobao.org)|120.55.149.135|:80... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 2160648 (2.1M) [application\/octet-stream]\nSaving to: \u2018tengine-2.2.0.tar.gz\u2019\n\n100%[===================================================================================================&gt;] 2,160,648   2.11MB\/s   in 1.0s\n\n2017-09-02 19:54:13 (2.11 MB\/s) - \u2018tengine-2.2.0.tar.gz\u2019 saved [2160648\/2160648]\n[root@localhost myapp]# tar -xzvf tengine-2.2.0.tar.gz\n[root@localhost myapp]# ls\ntengine-2.2.0  tengine-2.2.0.tar.gz\n[root@localhost myapp]# cd tengine-2.2.0\n[root@localhost tengine-2.2.0]# ls\nAUTHORS.te  CHANGES     CHANGES.ru  conf       contrib  html     man      packages  README.markdown  tests\nauto        CHANGES.cn  CHANGES.te  configure  docs     LICENSE  modules  README    src              THANKS.te\n[root@localhost tengine-2.2.0]# pwd\n\/root\/myapp\/tengine-2.2.0<\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>2. \u7136\u540e\u5c31\u662ftengine\u7684\u4e00\u4e9b\u4f9d\u8d56\u5305<\/p>\n<div class=\"cnblogs_code\">\n<pre>[root@localhost myapp]# yum install -y zlib zlib-devel openssl openssl-devel pcre pcre-devel gcc gcc-c++<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>3. \u5e38\u89c4\u7684configure, make,make install<\/p>\n<div class=\"cnblogs_code\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre>[root@localhost tengine-2.2.0]# .\/configure --prefix=\/usr\/myapp\/tengine\nchecking for OS\n + Linux 3.10.0-327.el7.x86_64 x86_64\nchecking for C compiler ... found\n + using GNU C compiler\n + gcc version: 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)\nchecking for gcc -pipe switch ... found\nchecking for gcc builtin atomic operations ... found\nchecking for C99 variadic macros ... found\nchecking for gcc variadic macros ... found\nchecking for compiler structure-packing pragma ... found\nchecking for unistd.h ... found\nchecking for inttypes.h ... found\nchecking for limits.h ... found\nchecking for sys\/filio.h ... not found\nchecking for sys\/param.h ... found\nchecking for sys\/mount.h ... found\nchecking for sys\/statvfs.h ... found\nchecking for crypt.h ... found\nchecking for Linux specific features\nchecking for epoll ... found\nchecking for EPOLLRDHUP ... found\nchecking for O_PATH ... found\nchecking for sendfile() ... found\nchecking for sendfile64() ... found\nchecking for sys\/prctl.h ... found\nchecking for prctl(PR_SET_DUMPABLE) ... found\nchecking for sched_setaffinity() ... found\nchecking for crypt_r() ... found\nchecking for SO_REUSEPORT ... found\nchecking for sys\/vfs.h ... found\nchecking for nobody group ... found\nchecking for poll() ... found\nchecking for \/dev\/poll ... not found\nchecking for kqueue ... not found\nchecking for crypt() ... not found\nchecking for crypt() in libcrypt ... found\nchecking for F_READAHEAD ... not found\nchecking for posix_fadvise() ... found\nchecking for O_DIRECT ... found\nchecking for F_NOCACHE ... not found\nchecking for directio() ... not found\nchecking for statfs() ... found\nchecking for statvfs() ... found\nchecking for dlopen() ... not found\nchecking for dlopen() in libdl ... found\nchecking for sysinfo() ... found\nchecking for getloadavg() ... found\nchecking for \/proc\/meminfo ... found\nchecking for sched_yield() ... found\nchecking for SO_SETFIB ... not found\nchecking for SO_ACCEPTFILTER ... not found\nchecking for TCP_DEFER_ACCEPT ... found\nchecking for TCP_KEEPIDLE ... found\nchecking for TCP_FASTOPEN ... found\nchecking for TCP_INFO ... found\nchecking for accept4() ... found\nchecking for eventfd() ... found\nchecking for int size ... 4 bytes\nchecking for long size ... 8 bytes\nchecking for long long size ... 8 bytes\nchecking for void * size ... 8 bytes\nchecking for uint64_t ... found\nchecking for sig_atomic_t ... found\nchecking for sig_atomic_t size ... 4 bytes\nchecking for socklen_t ... found\nchecking for in_addr_t ... found\nchecking for in_port_t ... found\nchecking for rlim_t ... found\nchecking for uintptr_t ... uintptr_t found\nchecking for system byte ordering ... little endian\nchecking for size_t size ... 8 bytes\nchecking for off_t size ... 8 bytes\nchecking for time_t size ... 8 bytes\nchecking for setproctitle() ... not found\nchecking for pread() ... found\nchecking for pwrite() ... found\nchecking for sys_nerr ... found\nchecking for localtime_r() ... found\nchecking for posix_memalign() ... found\nchecking for memalign() ... found\nchecking for mmap(MAP_ANON|MAP_SHARED) ... found\nchecking for mmap(\"\/dev\/zero\", MAP_SHARED) ... found\nchecking for System V shared memory ... found\nchecking for POSIX semaphores ... not found\nchecking for POSIX semaphores in libpthread ... found\nchecking for struct msghdr.msg_control ... found\nchecking for ioctl(FIONBIO) ... found\nchecking for struct tm.tm_gmtoff ... found\nchecking for struct dirent.d_namlen ... not found\nchecking for struct dirent.d_type ... found\nchecking for sysconf(_SC_NPROCESSORS_ONLN) ... found\nchecking for openat(), fstatat() ... found\nchecking for getaddrinfo() ... found\nchecking for PCRE library ... found\nchecking for PCRE JIT support ... found\nchecking for OpenSSL library ... found\nchecking for zlib library ... found\ncreating objs\/Makefile\n\nConfiguration summary\n  + using system PCRE library\n  + using system OpenSSL library\n  + md5: using OpenSSL library\n  + sha1: using OpenSSL library\n  + using system zlib library\n  + jemalloc library is disabled\n\n  nginx path prefix: \"\/usr\/myapp\/tengine\"\n  nginx binary file: \"\/usr\/myapp\/tengine\/sbin\/nginx\"\n  nginx configuration prefix: \"\/usr\/myapp\/tengine\/conf\"\n  nginx configuration file: \"\/usr\/myapp\/tengine\/conf\/nginx.conf\"\n  nginx pid file: \"\/usr\/myapp\/tengine\/logs\/nginx.pid\"\n  nginx error log file: \"\/usr\/myapp\/tengine\/logs\/error.log\"\n  nginx http access log file: \"\/usr\/myapp\/tengine\/logs\/access.log\"\n  nginx http client request body temporary files: \"client_body_temp\"\n  nginx dso module path: \"\/usr\/myapp\/tengine\/modules\/\"\n  nginx http proxy temporary files: \"proxy_temp\"\n  nginx http fastcgi temporary files: \"fastcgi_temp\"\n  nginx http uwsgi temporary files: \"uwsgi_temp\"\n  nginx http scgi temporary files: \"scgi_temp\"\n\n[root@localhost tengine-2.2.0]# make &amp;&amp; make install<\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>4. \u542f\u52a8tengine\u4e0b\u7684nginx\u8fdb\u7a0b\uff0c\u53ef\u4ee5\u770b\u5230\u5f53\u6211\u542f\u52a8\u4e4b\u540e\uff0ctengine\u768480\u7aef\u53e3\u5df2\u7ecf\u6253\u5f00\u4e86\u3002<\/p>\n<div class=\"cnblogs_code\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre>[root@localhost myapp]# ls\ntengine  tengine-2.2.0  tengine-2.2.0.tar.gz\n[root@localhost myapp]# cd tengine\n[root@localhost tengine]# ls\nconf  html  include  logs  modules  sbin\n[root@localhost tengine]# cd conf\n[root@localhost conf]# cd ..\/sbin\n[root@localhost sbin]# ls\ndso_tool  nginx\n[root@localhost sbin]# .\/nginx\n[root@localhost sbin]# netstat -tln\nActive Internet connections (only servers)\nProto Recv-Q Send-Q Local Address           Foreign Address         State\ntcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN\ntcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN\ntcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN\ntcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN\ntcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN\ntcp6       0      0 :::22                   :::*                    LISTEN\ntcp6       0      0 ::1:631                 :::*                    LISTEN\ntcp6       0      0 ::1:25                  :::*                    LISTEN\n[root@localhost sbin]#<\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903112042468-120492234.jpg\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e09\uff1acss\u6587\u4ef6\u548c\u5408\u5e76\u52a0\u8f7d\u7684\u9a8c\u8bc1<\/p>\n<p>&nbsp;<\/p>\n<p>1. css\u6587\u4ef6\u9a8c\u8bc1<\/p>\n<p>\u4e0b\u9762\u5728nginx.conf \u4e2d\u914d\u7f6e\u4e00\u4e0b\u9759\u6001\u8d44\u6e90\u7684\u8bbf\u95ee\u8def\u5f84\uff0c\u6240\u6709\u9759\u6001\u8d44\u6e90\u90fd\u662f\u653e\u5728\/usr\u76ee\u5f55\u4e0b\u3002<\/p>\n<div class=\"cnblogs_code\">\n<pre>        location ~ ^\/(images|javascript|js|css|flash|media|static)\/  {\n          root        \/usr;\n        }<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u7136\u540e\u751f\u6210 \/usr\/css\/top.css \u6587\u4ef6\uff0c\u6700\u7ec8\u6d4f\u89c8\u53ef\u4ee5\u53d1\u73b0\u914d\u7f6e\u5df2\u751f\u6548\u3002<\/p>\n<div class=\"cnblogs_code\">\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<pre>[root@localhost usr]# mkdir css\n[root@localhost usr]# ls\nbin  css  etc  games  include  lib  lib64  libexec  local  myapp  sbin  share  src  tmp\n[root@localhost usr]# cd css\n[root@localhost css]# rz\n\n[root@localhost css]# ls\ntop.css<\/pre>\n<div class=\"cnblogs_code_toolbar\"><span class=\"cnblogs_code_copy\"><a title=\"\u590d\u5236\u4ee3\u7801\"><img decoding=\"async\" src=\"http:\/\/common.cnblogs.com\/images\/copycode.gif\" alt=\"\u590d\u5236\u4ee3\u7801\" \/><\/a><\/span><\/div>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903114754858-1556681596.jpg\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>2. css \u5408\u5e76\u538b\u7f29<\/p>\n<p>\u8fd9\u4e2a\u5408\u5e76\u6a21\u5f0f\u8fd8\u9700\u8981\u5728tengine\u4e0b\u5b89\u88c5\u4e00\u4e2angx_http_concat_module \u6a21\u5757\uff0c\u53ef\u4ee5\u770b\u4e0b\u5b98\u7f51\uff1ahttp:\/\/tengine.taobao.org\/document_cn\/http_concat_cn.html\u3002<\/p>\n<p>\u6211\u8fd9\u91cc\u91c7\u7528\u9759\u6001\u7f16\u8bd1\uff0c\u7f16\u8bd1\u4e4b\u524d\u5148\u628a\u4e4b\u524d\u7684tengine\u8fdb\u7a0b\u7ed9\u5173\u95ed\u6389\uff08nginx -s stop\uff09\u3002<\/p>\n<div class=\"cnblogs_code\">\n<pre>[root@localhost myapp]# cd tengine-2.2.0\n[root@localhost tengine-2.2.0]# ls\nAUTHORS.te  CHANGES     CHANGES.ru  conf       contrib  html     Makefile  modules  packages  README.markdown  tests\nauto        CHANGES.cn  CHANGES.te  configure  docs     LICENSE  man       objs     README    src              THANKS.te\n[root@localhost tengine-2.2.0]# .\/configure --prefix=\/usr\/myapp\/tengine --with-http_concat_module &amp;&amp; make &amp;&amp; make install<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u63a5\u4e0b\u6765\u53ea\u8981\u5728nginx.conf \u4e2d\u914d\u7f6econcat on\uff0c\u6700\u591a\u5408\u5e7620\u4e2a\u6587\u4ef6\uff0c\u6700\u540e nginx -s reload \u91cd\u542f\u4e00\u4e0b<\/p>\n<div class=\"cnblogs_code\">\n<pre>        location ~ ^\/(images|javascript|js|css|flash|media|static)\/  {\n          root        \/usr;\n          concat on;\n          concat_max_files 20;\n          concat_types text\/css application\/x-javascript;\n        }<\/pre>\n<\/div>\n<p>\u63a5\u4e0b\u6765\u518d\u4e0a\u4f20\u4e00\u4e2atips.css\u5230\/usr\/css\u76ee\u5f55\u4e0b\uff0c\u7136\u540e\u952e\u5165url\uff1ahttp:\/\/192.168.23.168\/css\/??top.css,tips.css \uff0c\uff0c\uff0c\u7ec8\u4e8e\u5927\u529f\u544a\u6210\u5566\u3002\u3002\u3002\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2017.cnblogs.com\/blog\/214741\/201709\/214741-20170903121339640-2114936148.jpg\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u597d\u4e86\uff0c\u672c\u7bc7\u5c31\u8bf4\u5230\u8fd9\u91cc\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u5e2e\u52a9\u3002\u3002\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/www.cnblogs.com\/huangxincheng\/p\/7469328.html &nbsp; \u5728\u4e00\u4e2a\u9879\u76ee\u8fd8\u662f\u5355\u4f53\u67b6\u6784\u7684\u65f6\u5019\uff0c\u6240\u6709\u7684js\uff0ccss\uff0cimage\u90fd\u4f1a\u5728\u4e00\u4e2aweb\u7f51\u7ad9\u4e0a\uff0c\u770b\u8d77\u6765\u5e76\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u6bd4\u5982\u4e0b\u9762\u8fd9\u6837\uff1a \u4f46\u662f\u5f53web\u7f51\u7ad9\u6d41\u91cf\u8d77\u6765\u7684\u65f6\u5019\uff0c\u8fd9\u4e2a\u5355\u4f53\u67b6\u6784\u5fc5\u987b\u8981\u8fdb\u884c\u6a2a\u5411\u6269\u5c55\uff0c\u800c\u5728\u539f\u6765\u7684\u67b6\u6784\u4e2d\u9759\u6001\u8d44\u6e90\u8fd9\u7f8a\u6bdb\u662f\u51fa\u5728\u5355\u4f53\u67b6\u6784\u8fd9\u5934\u7f8a\u8eab\u4e0a\uff0c\u6240\u4ee5\u6a2a\u5411\u591a\u5c11 \u4e2a\u5355\u4f53\uff0c\u5c31\u6709\u591a\u5c11\u4e2a\u9759\u6001\u8d44\u6e90\u6587\u4ef6\u5939\uff0c\u6bd4\u5982\u4e0b\u9762\u8fd9\u6837\u7684\u67b6\u6784\u3002 \u90a3\u8fd9\u79cd\u67b6\u6784\u6709\u4ec0\u4e48\u95ee\u9898\u5462\uff1f \u603b\u7684\u6765\u8bf4\u4f1a\u6709\u5982\u4e0b\u4e8c\u4e2a\u95ee\u9898\uff1a &nbsp; 1. \u00a0 \u6d4f\u89c8\u5668\u5bf9\u5355\u4e00\u57df\u540d\u7684\u8bf7\u6c42\u6709\u5e76\u53d1\u9650\u5236\u3002 \u5728\u540c\u4e00\u4e2a\u57df\u540d\u4e0b\uff0c\u4e00\u822c\u6765\u8bf4\u6709js\uff0ccss,img,media,html\u7b49\u7b49\u9759\u6001\u8d44\u6e90\uff0c\u5982\u679c\u8d44\u6e90\u90fd\u6302\u5728\u540c\u4e00\u4e2a\u57df\u540d\u4e0b\uff0c\u52bf\u5fc5\u4f1a\u5f71\u54cd\u9875\u9762\u7684\u52a0\u8f7d\u901f\u5ea6\uff0c\u800c\u4e14\u5355\u4e00\u57df\u540d \u4e0b\u9759\u6001\u8d44\u6e90\u8fd8\u4f1a\u5e26\u4e0a\u540c\u57df\u540d\u4e0b\u7684cookie\u7b49\u672c\u4e0d\u9700\u8981\u9644\u52a0\u7684\u4fe1\u606f\u3002 &nbsp; 2. \u00a0\u4e0d\u65b9\u4fbf\u7ba1\u7406\u548c\u8d44\u6e90\u7684\u6d6a\u8d39 \u4e3a\u4ec0\u4e48\u8fd9\u4e48\u8bf4\u5462\uff1f \u6211\u4eec\u77e5\u9053\u9759\u6001\u8d44\u6e90\u4e00\u822c\u6765\u8bf4\u90fd\u662f\u5f88\u5360\u8d44\u6e90\u7a7a\u95f4\u7684\uff0c\u5c24\u5176\u662f\u7528\u6237\u4e0a\u4f20\u7684\u5934\u50cf\uff0ccsv\u90a3\u66f4\u662f\u5360\u7528web\u670d\u52a1\u5668\u8d44\u6e90\uff0c\u4e3a\u4e86\u5e94\u5bf9\u7a81\u53d1\u60c5\u51b5\uff0c \u4e00\u822c\u4f1a\u4fdd\u6301web\u4ee3\u7801\u76843\u4e2a\u7248\u672c\u7684\u56de\u6eda\u7b56\u7565\uff0c\u4e5f\u5c31\u662f\u8bf4\u4f60\u9700\u8981\u5728web1\uff0cweb2\uff0cweb3\u4e0a\u540c\u65f6\u8fdb\u884c3\u4e2a\u9759\u6001\u8d44\u6e90\u6587\u4ef6\u5939\u7684copy\uff0c\u76f8\u6bd4\u5355\u72ec\u7528\u9759\u6001\u8d44\u6e90\u670d\u52a1 \u5668\u7edf\u4e00\u7ba1\u7406\u7684\u6587\u4ef6\u5939\u7684\u60c5\u51b5\u5bf9\u6bd4\uff0c\u524d\u8005\u7684\u78c1\u76d8\u8d44\u6e90\u7684\u6d6a\u8d39\u53ef\u60f3\u800c\u77e5\u3002\u3002\u3002\u6240\u4ee5\u6539\u6b63\u540e\u7684\u67b6\u6784\u5e94\u8be5\u662f\u8fd9\u6837\u7684\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-637","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=637"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/637\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}