Last active
September 6, 2023 06:51
-
-
Save iTeeLion/6b29acd24f049bc377fdd4b6fbc62e17 to your computer and use it in GitHub Desktop.
Fastpanel bitrix24 manual config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### MAIN DIFFERENCE WITH DEFAULT CONFIG ### | |
index index.php; | |
location / { | |
try_files $uri $uri/ /bitrix/routing_index.php?$args; | |
} | |
### FULL CONFIG SAMPLE BELOW ### | |
server { | |
server_name b24.site.ru; | |
listen 443 ssl http2; | |
ssl_certificate "/var/www/httpd-cert/b24.site.ru_2023-06-25-16-47_00.crt"; | |
ssl_certificate_key "/var/www/httpd-cert/b24.site.ru_2023-06-25-16-47_00.key"; | |
charset utf-8; | |
gzip on; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_types text/css text/xml application/javascript text/plain application/json image/svg+xml image/x-icon; | |
gzip_comp_level 5; | |
set $root_path /var/www/user/data/www/b24.site.ru; | |
root $root_path; | |
disable_symlinks if_not_owner from=$root_path; | |
index index.php; | |
location / { | |
try_files $uri $uri/ /bitrix/routing_index.php?$args; | |
} | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass unix:/var/run/b24.site.ru.sock; | |
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
fastcgi_param DOCUMENT_ROOT $realpath_root; | |
} | |
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpeg|avi|zip|gz|bz2|rar|swf|ico|7z|doc|docx|map|ogg|otf|pdf|tff|tif|txt|wav|webp|woff|woff2|xls|xlsx|xml)$ { | |
try_files $uri $uri/ /bitrix/routing_index.php?$args; | |
} | |
location @fallback { | |
fastcgi_pass unix:/var/run/cb24.mws.iteelion.ru.sock; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include /etc/nginx/fastcgi_params; | |
} | |
include "/etc/nginx/fastpanel2-sites/user/b24.site.ru.includes"; | |
include /etc/nginx/fastpanel2-includes/*.conf; | |
error_log /var/www/user/data/logs/b24.site.ru-frontend.error.log; | |
access_log /var/www/user/data/logs/b24.site.ru-frontend.access.log; | |
} | |
server { | |
server_name b24.site.ru; | |
listen 80; | |
return 301 https://$host$request_uri; | |
error_log /var/www/user/data/logs/b24.site.ru-frontend.error.log; | |
access_log /var/www/user/data/logs/b24.site.ru-frontend.access.log; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment