Nginx中介軟體web服務安裝

來源:互聯網
上載者:User

標籤:中介軟體 nginx web

安裝pcre庫[[email protected] ~]# rpm -qa pcre pcre-devel[[email protected] ~]# yum install -y openssl openssl-devel[[email protected] ~]# rpm -qa pcre pcre-devel  pcre-devel-7.8-7.el6.x86_64pcre-7.8-7.el6.x86_64編譯安裝nginx-1.6.3[[email protected] ~]# rpm -qa nginx[[email protected] ~]# mkdir /home/lufeng/tools -p[[email protected] ~]# cd /home/lufeng/tools/[[email protected] tools]# wget -q http://nginx.org/download/nginx-1.6.3.tar.gz[[email protected] tools]# tar xf nginx-1.6.3.tar.gz [[email protected] tools]# cd nginx-1.6.3[[email protected] nginx-1.6.3]# useradd nginx -s /sbin/nologin -M[[email protected] nginx-1.6.3]# ./configure --prefix=/application/nginx-1.6.3 --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module[[email protected] nginx-1.6.3]# make[[email protected] nginx-1.6.3]# make install[[email protected] tools]# ln -s /application/nginx-1.6.3/ /application/nginx啟動並檢查nginx服務[[email protected] tools]# /application/nginx/sbin/nginx -tnginx: the configuration file /application/nginx-1.6.3/conf/nginx.conf syntax is oknginx: configuration file /application/nginx-1.6.3/conf/nginx.conf test is successful[[email protected] tools]# /application/nginx/sbin/nginx[[email protected] tools]# netstat -lntup|grep nginx[[email protected] tools]# wget 127.0.0.1[[email protected] tools]# curl 127.0.0.1基於多網域名稱的虛擬機器主機配置設定檔:[[email protected] conf]# cat nginx.confworker_processes  1;events {    worker_connections  1024;}http {    include       mime.types;    default_type  application/octet-stream;    sendfile        on;    keepalive_timeout  65;include extra/www.conf;include extra/blog.conf;include extra/bbs.conf;}[[email protected] conf]# cat ./extra/www.conf server {       listen         80;       server_name    www.lufeng.com;       location / {            root      html/www;            index     index.html index.html;        }}[[email protected] conf]# cat ./extra/bbs.conf server {       listen         80;       server_name    bbs.lufeng.com;       location / {            root      html/bbs;            index     index.html index.html;        }}[[email protected] conf]# cat ./extra/blog.conf     server {       listen         80;       server_name    blog.lufeng.com;       location / {            root      html/blog;            index     index.html index.html;        }}


本文出自 “大夢初醒” 部落格,請務必保留此出處http://bestlufeng.blog.51cto.com/11790256/1910952

Nginx中介軟體web服務安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.