Код: Выделить всё
spawn-fcgi -s /var/run/abills.sock -u $USER_NGNIX_NAME /usr/sbin/fcgiwrap
Код: Выделить всё
server {
listen 443;
server_name billing.haha.ru;
root /usr/abills/cgi-bin;
#charset koi8-r;
#access_log logs/host.access.log main;
error_log /var/log/nginx/error-abills.log;
location / {
root /usr/abills/cgi-bin;
index index.cgi;
}
#error_page 404 /404.html;
ssl on;
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;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~\.cgi$ {
root /usr/abills/cgi-bin;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/abills.sock;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /usr/abills/cgi-bin$fastcgi_script_name;
include fastcgi_params;
}
}
Админка к сожалению остаётся в апаче
Забыл дописать что для автоматического перенаправления в https в начале конфига надо написать
Код: Выделить всё
server {
listen 80;
server_name billing.haha.ru;
if ($uri ~* "/$") {
rewrite ^/(.*)$ https://$host/ redirect;
}
}