Skip to end of metadata
Go to start of metadata
Конфигурационный файл nginx, etc
FreeBSD
user www www;
pid /var/run/nginx.pid;
worker_processes 2; # = CPU cores count
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 9443 ssl;
server_name billing.abillz.net; # = DNS name or IP if no DNS record exist
root /usr/abills/cgi-bin;
index index.cgi;
charset utf-8;
access_log /var/log/abills-access.log;
error_log /var/log/abills-error.log;
ssl_certificate /usr/abills/Certs/server.crt;
ssl_certificate_key /usr/abills/Certs/server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL;
ssl_prefer_server_ciphers off;
location / {
try_files $uri $uri /index.cgi;
}
location /admin {
try_files $uri $uri /admin/index.cgi;
}
location ^~ /images/ {
alias /usr/abills/Abills/templates/;
location ~* \.(jpg|gif|png|css|js|JPG|GIF)$ {
allow all;
}
deny all;
}
location ~ \.cgi|pm|pl$ {
gzip off;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock;
fastcgi_index index.cgi;
fastcgi_param HTTP_CGI_AUTHORIZATION $http_authorization;
fastcgi_param SCRIPT_FILENAME /usr/abills/cgi-bin$fastcgi_script_name;
include fastcgi_params;
}
}
}
Debian / Ubuntu
user www-data www-data;
pid /var/run/nginx.pid;
worker_processes 2; # = CPU cores count
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 9443 ssl;
server_name billing.abillz.net; # = DNS name or IP if no DNS record exist
root /usr/abills/cgi-bin;
index index.cgi;
charset utf-8;
access_log /var/log/abills-access.log;
error_log /var/log/abills-error.log;
ssl_certificate /usr/abills/Certs/server.crt;
ssl_certificate_key /usr/abills/Certs/server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL;
ssl_prefer_server_ciphers off;
location / {
try_files $uri $uri /index.cgi;
}
location /admin {
try_files $uri $uri /admin/index.cgi;
}
location ^~ /images/ {
alias /usr/abills/Abills/templates/;
location ~* \.(jpg|gif|png|css|js|JPG|GIF)$ {
allow all;
}
deny all;
}
location ~ \.cgi|pm|pl$ {
gzip off;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.cgi;
fastcgi_param HTTP_CGI_AUTHORIZATION $http_authorization;
fastcgi_param SCRIPT_FILENAME /usr/abills/cgi-bin$fastcgi_script_name;
include fastcgi_params;
}
}
}
CentOS
user apache apache;
pid /var/run/nginx.pid;
worker_processes 2; # = CPU cores count
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 9443 ssl;
server_name billing.abillz.net; # = DNS name or IP if no DNS record exist
root /usr/abills/cgi-bin;
index index.cgi;
charset utf-8;
access_log /var/log/abills-access.log;
error_log /var/log/abills-error.log;
ssl_certificate /usr/abills/Certs/server.crt;
ssl_certificate_key /usr/abills/Certs/server.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL;
ssl_prefer_server_ciphers off;
location / {
try_files $uri $uri /index.cgi;
}
location /admin {
try_files $uri $uri /admin/index.cgi;
}
location ^~ /images/ {
alias /usr/abills/Abills/templates/;
location ~* \.(jpg|gif|png|css|js|JPG|GIF)$ {
allow all;
}
deny all;
}
location ~ \.cgi|pm|pl$ {
gzip off;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.cgi;
fastcgi_param HTTP_CGI_AUTHORIZATION $http_authorization;
fastcgi_param SCRIPT_FILENAME /usr/abills/cgi-bin$fastcgi_script_name;
include fastcgi_params;
}
}
}
FCGI_SOCKET=/var/run/fcgiwrap.socket
FCGI_PROGRAM=/usr/local/sbin/fcgiwrap
FCGI_USER=apache
FCGI_GROUP=apache
FCGI_EXTRA_OPTIONS="-M 0770"
OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"
Запускаем сервисы, проверяем :