Initial commit
This commit is contained in:
1
config/nginx/conf.d/.gitignore
vendored
Normal file
1
config/nginx/conf.d/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.conf
|
55
config/nginx/conf.d/vhost.conf.example
Normal file
55
config/nginx/conf.d/vhost.conf.example
Normal file
@ -0,0 +1,55 @@
|
||||
upstream fpm {
|
||||
server php-fpm:9000;
|
||||
}
|
||||
|
||||
upstream fpm7.1 {
|
||||
server php7.1-fpm:9000;
|
||||
}
|
||||
|
||||
map $http_host $root {
|
||||
loc.octobercms /usr/share/nginx/html/someproject;
|
||||
loc.wordpress /usr/share/nginx/html/someprojectwp;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name loc.octobercms;
|
||||
listen 80;
|
||||
root $root;
|
||||
#include global/auth.conf;
|
||||
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
|
||||
include includes.d/octobercms.conf;
|
||||
include includes.d/staticfiles.conf;
|
||||
location ~ ^/index.php {
|
||||
fastcgi_pass fpm;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name loc.wordpress;
|
||||
listen 80;
|
||||
root $root;
|
||||
index index.html index.htm index.php;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
||||
|
||||
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
|
||||
access_log off;
|
||||
}
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||
|
||||
fastcgi_pass fpm;
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
}
|
47
config/nginx/includes.d/octobercms.conf
Normal file
47
config/nginx/includes.d/octobercms.conf
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
location / {
|
||||
rewrite ^/.*$ /index.php last;
|
||||
}
|
||||
location ~ ^/combine.*\.(css|js) {
|
||||
rewrite ^/.*$ /index.php last;
|
||||
expires max;
|
||||
}
|
||||
# Whitelist
|
||||
## Let October handle if static file not exists
|
||||
location ~ ^/favicon\.ico { try_files $uri /index.php; }
|
||||
location ~ ^/sitemap\.xml { try_files $uri /index.php; }
|
||||
location ~ ^/robots\.txt { try_files $uri /index.php; }
|
||||
location ~ ^/humans\.txt { try_files $uri /index.php; }
|
||||
|
||||
## Let nginx return 404 if static file not exists
|
||||
location ~ ^/storage/app/uploads/public { try_files $uri /404; }
|
||||
location ~ ^/storage/app/media { try_files $uri /404; }
|
||||
location ~ ^/files { try_files $uri /404; }
|
||||
location ~ ^/storage/app/.*\.xls { try_files $uri /404; }
|
||||
location ~ ^/storage/temp/public { try_files $uri /404; }
|
||||
|
||||
location ~ ^/modules/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/widgets/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/widgets/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
||||
|
||||
location ~ ^/plugins/.*/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri /404; }
|
||||
|
||||
location ~ ^/themes/.*/assets { try_files $uri /404; }
|
||||
location ~ ^/themes/.*/semantic { try_files $uri /404; }
|
||||
location ~ ^/themes/.*/resources { try_files $uri /404; }
|
21
config/nginx/includes.d/staticfiles.conf
Normal file
21
config/nginx/includes.d/staticfiles.conf
Normal file
@ -0,0 +1,21 @@
|
||||
rewrite "^(.*)\.(\d{10})\.(css|js)$" $1.$3 break;
|
||||
location ~* \.(jpg|jpeg|gif|png|svg|ico)$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
log_not_found off;
|
||||
error_page 404 = /empty;
|
||||
}
|
||||
location = /empty {
|
||||
expires 0;
|
||||
empty_gif;
|
||||
}
|
||||
location ~* \.(eot|ttf|woff|pdf|css|js)$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
}
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
location ~* \.(tpl|ini|sh) {
|
||||
deny all;
|
||||
}
|
1319
config/redis/redis.conf
Normal file
1319
config/redis/redis.conf
Normal file
File diff suppressed because it is too large
Load Diff
2
config/sphinx/.gitignore
vendored
Executable file
2
config/sphinx/.gitignore
vendored
Executable file
@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
Reference in New Issue
Block a user