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; } }
Install on Slackware
nginx.conf with reverse proxy example
# 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; } } }