源碼安裝H2O Http 服務端程式到Ubuntu伺服器

來源:互聯網
上載者:User

標籤:rpm   源碼安裝   tor   man   ssl   j2me   mat   err   pdf   

首先安裝全家桶

apt install -y build-essential zlib1g-dev libpcre3 libpcre3-dev unzip cmake libncurses5-dev libpam0g-dev bison libboost-dev libssl-dev openssl g++ libxml2-dev libcurl3-openssl-dev libpng-dev libpng12-dev libfreetype6-dev libfreetype6-dev

 

下載安裝包:

curl https://github.com/h2o/h2o/archive/v2.2.2.tar.gz -o v2.2.2.tar.gz

 

解壓:

 tar zxf v2.2.2.tar.gz

 

配置安裝目錄:

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/h2o -DWITH_BUNDLED_SSL=on

 

編譯安裝:

make -j8

make install

 

設定檔:

vim /home/etc/h2o.cf

  1 access-log: /tmp/h2o.log  2 error-log: /tmp/h2o.err  3 pid-file: /tmp/h2o.pid  4 max-connections: 512  5 file.send-gzip: ON  6 tcp-fastopen: 3  7 user: www  8 file.index: [ ‘index.php‘, ‘index.html‘ ]  9 file.mime.addtypes: 10 text/html: .html .htm .shtml 11 text/css: .css 12 text/xml: .xml 13 image/gif: .gif 14 image/jpeg: .jpeg .jpg 15 application/javascript: .js 16 application/atom+xml: .atom 17 application/rss+xml: .rss 18  19 text/mathml: .mml 20 text/plain: .txt 21 text/vnd.sun.j2me.app-descriptor: .jad 22 text/vnd.wap.wml: .wml 23 text/x-component: .htc 24  25 image/png: .png 26 image/tiff: .tif .tiff 27 image/vnd.wap.wbmp: .wbmp 28 image/x-icon: .ico 29 image/x-jng: .jng 30 image/x-ms-bmp: .bmp 31 image/svg+xml: .svg .svgz 32 image/webp: .webp 33  34 application/font-woff: .woff 35 application/java-archive: .jar .war .ear 36 application/json: .json 37 application/mac-binhex40: .hqx 38 application/msword: .doc 39 application/pdf: .pdf 40 application/postscript: .ps .eps .ai 41 application/rtf: .rtf 42 application/vnd.apple.mpegurl: .m3u8 43 application/vnd.ms-excel: .xls 44 application/vnd.ms-fontobject: .eot 45 application/vnd.ms-powerpoint: .ppt 46 application/vnd.wap.wmlc: .wmlc 47 application/vnd.google-earth.kml+xml: .kml 48 application/vnd.google-earth.kmz: .kmz 49 application/x-7z-compressed: .7z 50 application/x-cocoa: .cco 51 application/x-java-archive-diff: .jardiff 52 application/x-java-jnlp-file: .jnlp 53 application/x-makeself: .run 54 application/x-perl: .pl .pm 55 application/x-pilot: .prc .pdb 56 application/x-rar-compressed: .rar 57 application/x-redhat-package-manager: .rpm 58 application/x-sea: .sea 59 application/x-shockwave-flash: .swf 60 application/x-stuffit: .sit 61 application/x-tcl: .tcl .tk 62 application/x-x509-ca-cert: .der .pem .crt 63 application/x-xpinstall: .xpi 64 application/xhtml+xml: .xhtml 65 application/xspf+xml: .xspf 66 application/zip: .zip 67  68 application/octet-stream: .bin .exe .dll 69 application/octet-stream: .deb 70 application/octet-stream: .dmg 71 application/octet-stream: .iso .img 72 application/octet-stream: .msi .msp .msm 73  74 application/vnd.openxmlformats-officedocument.wordprocessingml.document: .docx 75 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: .xlsx 76 application/vnd.openxmlformats-officedocument.presentationml.presentation: .pptx 77  78 audio/midi: .mid .midi .kar 79 audio/mpeg: .mp3 80 audio/ogg: .ogg 81 audio/x-m4a: .m4a 82 audio/x-realaudio: .ra 83  84 video/3gpp: .3gpp .3gp 85 video/mp2t: .ts 86 video/mp4: .mp4 87 video/mpeg: .mpeg .mpg 88 video/quicktime: .mov 89 video/webm: .webm 90 video/x-flv: .flv 91 video/x-m4v: .m4v 92 video/x-mng: .mng 93 video/x-ms-asf: .asx .asf 94 video/x-ms-wmv: .wmv 95 video/x-msvideo: .avi 96  97 hosts: 98 "網域名稱:連接埠": 99 #header.add: "strict-transport-security: max-age=39420000; includesubdomains; preload"100 header.add: "X-Frame-Options: SAMEORIGIN"101 header.add: "X-Content-Type-Options: nosniff"102 header.add: "X-XSS-Protection: 1; mode=block"103 listen:104 port: 連接埠105 #ssl:106 #certificate-file: /home/wwwroot/ssl/miraisann.com.crt107 #key-file: /home/wwwroot/ssl/miraisann.com.key108 #dh-file: /home/wwwroot/ssl/dhparam4096.pem109 #minimum-version: TLSv1.1110 #cipher-preference: server111 #cipher-suite: CHACHA20 EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4112 paths:113 /:114 file.dir: /home/wwwroot/domain/xx.com115 redirect:116 url: /index.php/117 internal: YES118 status: 307119 file.custom-handler:120 extension: .php121 fastcgi.connect:122 port: /tmp/php-fpm.sock123 type: unix

 

源碼安裝H2O Http 服務端程式到Ubuntu伺服器

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.