Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- server {
- listen 8800 ssl http2;
- server_name _;
- set $port_brainy_proxy 8802;
- root /usr/local/brainycp;
- ssl on;
- ssl_certificate /etc/brainy/ssl/brainy.crt;
- ssl_certificate_key /etc/brainy/ssl/brainy.key;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_ciphers "HIGH:!RC4:!aNULL:!MD5:!kEDH";
- add_header Strict-Transport-Security 'max-age=604800';
- access_log /usr/local/brainycp/src/compiled/nginxb/vhost_logs/brainy_access;
- error_log /usr/local/brainycp/src/compiled/nginxb/vhost_logs/brainy_error;
- location ~ /api/ {
- auth_basic off;
- include /usr/local/brainycp/src/compiled/nginxb/conf_add/api_location.conf;
- allow 127.0.0.1/32;
- deny all;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainy.sock;
- fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/local/brainycp$fastcgi_script_name;
- fastcgi_param PATH_TRANSLATED /usr/local/brainycp$fastcgi_script_name;
- }
- location ~ /webshell/(?<token>.*)/ {
- auth_request @auth;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_pass http://127.0.0.1:4200;
- proxy_read_timeout 90;
- proxy_redirect off;
- }
- location ~ /tmp/backup_replication {
- root /etc/brainy/;
- }
- location = @auth {
- internal;
- proxy_pass_header Authorization;
- proxy_pass http://$server_addr:$port_brainy_proxy/scripts/confirm_auth.php?token=$token;
- proxy_read_timeout 90;
- proxy_pass_request_body off;
- proxy_set_header Content-Length "";
- proxy_set_header X-Original-URI $request_uri;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Real-IP $remote_addr;
- }
- location /phpmyadmin {
- #root /usr/local/brainycp/src/compiled/;
- alias /usr/local/brainycp/src/compiled/phpmyadmin;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- #alias /usr/local/brainycp/src/compiled/phpmyadmin;
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/phpmyadmin/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- location /phpMyAdmin {
- rewrite ^/* /phpmyadmin last;
- }
- #
- location /phpmyadmin2 {
- #root /usr/local/brainycp/src/compiled/;
- alias /usr/local/brainycp/src/compiled/phpmyadmin2;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- #alias /usr/local/brainycp/src/compiled/phpmyadmin;
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/phpmyadmin2/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- # location /phpsignon {
- # rewrite ^/* /phpmyadmin2 last;
- # }
- location /phpsignon {
- alias /usr/local/brainycp/src/compiled/phpmyadmin2;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- #alias /usr/local/brainycp/src/compiled/phpmyadmin;
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/phpsignon/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- #fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainy.sock;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- #
- location /roundcube {
- alias /usr/share/roundcube;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/roundcube/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- location /webmail {
- alias /usr/share/roundcube;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt|woff|woff2)$ {
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/webmail/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- #
- location /squirrelmail {
- alias /usr/share/squirrelmail;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/squirrelmail/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- fastcgi_param PHP_VALUE "display_errors = Off";
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- #
- location /phpPgAdmin {
- alias /usr/share/phpPgAdmin;
- index index.php index.html index.htm;
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
- access_log off;
- expires 10m;
- add_header Cache-Control "public";
- add_header X-Proxy-Cache $upstream_cache_status;
- }
- location ~ ^/phpPgAdmin/(.+\.php)$ {
- try_files $uri =404;
- fastcgi_param SCRIPT_FILENAME $request_filename;
- fastcgi_index index.php;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainyservice.sock;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- }
- }
- location /phppgadmin {
- rewrite ^/* /phpPgAdmin last;
- }
- location ~* \.(ttf|jpg|jpeg|gif|png|ico|css|bmp|swf|js|txt|tar|avi|zip|tar.gz|pdf|woff[2]?)$ {
- root /usr/local/brainycp;
- access_log off;
- #expires 30d;
- #access_log /usr/local/brainycp/src/compiled/nginxb/vhost_logs/brainy_aaaaaaaa;
- add_header Cache-Control "public";
- }
- #location ~ /.well-known {
- # allow all;
- #}
- # location ~ /plugins/(.*){
- # root /usr/local/brainycp;
- # index index.php;
- # #rewrite ^(.*)$ /index.php?q=$1;
- # rewrite ^(.*)$ /index.php?qqq=$1;
- # }
- location ~* robots.txt { root /usr/local/brainycp/src/compiled/nginxb; }
- #location / {
- # proxy_pass http://127.0.0.1:8080;
- # proxy_redirect off;
- # proxy_force_ranges on;
- # proxy_set_header Host $host;
- # proxy_set_header X-Real-IP $remote_addr;
- # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- # client_max_body_size 124m;
- # client_body_buffer_size 128k;
- #
- # proxy_cache one;
- # proxy_cache_key "$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
- # #access_log /etc/nginx/vhost_logs/brainte2.shn-host.ru.cache;
- #
- # proxy_cache_valid 10s;
- # proxy_cache_min_uses 2;
- # # proxy_cache_lock on;
- # # proxy_cache_use_stale error timeout;
- # # proxy_cache_use_stale updating http_502 http_504;
- #
- # limit_conn lone 5;
- # # limit_req zone=ltwo burst=10;
- #
- # proxy_connect_timeout 90;
- # proxy_send_timeout 90;
- # proxy_read_timeout 90;
- # proxy_buffer_size 4k;
- # proxy_buffers 8 32k;
- # proxy_busy_buffers_size 64k;
- # proxy_temp_file_write_size 10m;
- #}
- location ~ \.php$ {
- root /usr/local/brainycp;
- location ~ /script/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /ssh/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /lib/roundclogin.php {
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainy.sock;
- fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/local/brainycp$fastcgi_script_name;
- fastcgi_param PATH_TRANSLATED /usr/local/brainycp$fastcgi_script_name;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- }
- location ~ /plugins/elFinder-2.1.9/php/connector.minimal.admin.php {
- root /usr/local/brainycp;
- index index.php;
- #if ($access_ipa = 0) { return 404;}
- rewrite ^(.*)$ /index.php?qqq=$1;
- }
- location ~ /plugins/elFinder-2.1.9/php/connector.minimal.client.php {
- root /usr/local/brainycp;
- index index.php;
- rewrite ^(.*)$ /index.php?qqq=$1;
- }
- location ~ /plugins/elFinder_backups/php/connector_backup.php {
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainy.sock;
- fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/local/brainycp$fastcgi_script_name;
- fastcgi_param PATH_TRANSLATED /usr/local/brainycp$fastcgi_script_name;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- }
- location ~ /lib/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /plugins/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- #fastcgi_pass unix:/var/run/brainyphp-fpm/php72-brainy.sock;
- fastcgi_pass unix:/var/run/brainyphp-fpm/php56-brainy.sock;
- #fastcgi_pass 127.0.0.1:9025;
- fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /usr/local/brainycp$fastcgi_script_name;
- fastcgi_param PATH_TRANSLATED /usr/local/brainycp$fastcgi_script_name;
- include /usr/local/brainycp/src/compiled/nginxb/fastcgi_params;
- #fastcgi_param PHP_ADMIN_VALUE "open_basedir=.:/usr/local/brainycp";
- #fastcgi_pass_request_body on;
- #client_body_in_file_only off;
- #client_max_body_size 124m;
- client_max_body_size 2048m;
- client_body_buffer_size 256k;
- fastcgi_temp_file_write_size 500m;
- fastcgi_request_buffering off;
- #proxy_buffering on;
- #fastcgi_buffering on;
- #fastcgi_buffers 32 32k;
- #fastcgi_buffer_size 64k;
- fastcgi_buffers 8 32k;
- fastcgi_buffer_size 64k;
- fastcgi_busy_buffers_size 64k;
- fastcgi_connect_timeout 3600;
- fastcgi_read_timeout 3600;
- fastcgi_send_timeout 3600;
- fastcgi_cache bfcgi2;
- fastcgi_cache_key "$scheme|$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
- fastcgi_cache_valid 200 10s;
- limit_conn lbfcgi2 20;
- }
- #location / {
- # root /usr/local/brainycp;
- # if (!-e $request_filename) {
- # rewrite ^(.+)$ /index.php?q=$1 last;
- # }
- #}
- location ~ /\.ht {
- deny all;
- }
- location ~ /\.well-known {
- allow all;
- root /var/www/html;
- }
- location ~* \.conf {
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /ssh/(.*) {
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /src/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /conf/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /script/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /data/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /lib/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location ~ /plugins/(.*){
- auth_basic off;
- allow 127.0.0.1/32;
- deny all;
- }
- location / {
- root /usr/local/brainycp;
- index index.php;
- try_files $uri $uri/ /index.php?q=$uri&$args;
- #rewrite ^(.*)$ /index.php?q=$1;
- }
- error_page 404 /404.html;
- location = /40x.html {
- }
- #error_page 500 502 503 504 /50x.html;
- #location = /50x.html {
- #}
- location /webshell {
- proxy_ssl_trusted_certificate /var/lib/shellinabox/certificate.pem;
- }
- }
Advertisement