MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap
Revision 3 as of 2017-01-25 18:50:31
  • nginx

nginx

Install on FreeBSD 10.3

  • pkg install nginx
  • /usr/local/etc/nginx/nginx.conf

load_module /usr/local/libexec/nginx/ngx_mail_module.so;
load_module /usr/local/libexec/nginx/ngx_stream_module.so;

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;

        location / {
            root   /usr/local/www/nginx;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/local/www/nginx-dist;
        }
    }

}

include /usr/local/etc/nginx/sslbalance.d/*;
  • /usr/local/etc/nginx/sslbalance.d/sslbalance.conf

stream{
   upstream backend {
       server 127.0.0.1:8443;
       server 127.0.0.1:8444;
    }

   server {
       listen 443;
       proxy_pass backend;
   }
}

cd /tmp 
wget https://slackbuilds.org/slackbuilds/14.2/network/nginx.tar.gz
tar xvzf nginx.tar.gz
cd nginx
wget http://nginx.org/download/nginx-1.10.2.tar.gz
./nginx.SlackBuild
installpkg  /tmp/nginx-1.10.2-x86_64-1_SBo.tgz

/etc/rc.d/rc.httpd stop
sh /etc/rc.d/rc.nginx start

# nginx.conf
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;


    server {
        listen       80;
        server_name  localhost;

        location / {
            root   /var/www/html;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /var/www/html;
        }
    }

    server{
          listen 80;
          server_name abc.example.org;
          location / { proxy_pass   http://127.0.0.1:8081; }
     }

    server {
      listen 80;
      server_name cde.example.org;
      location / {  proxy_pass   http://127.0.0.1:8082; }
    }

}
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01