Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Docker image and configuration update

givanz797fea83eb69
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 7da7fbb..c8a5341 100755
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -30,7 +30,7 @@ services:
volumes:
- ./:/var/www/html/
links:
- - db:mysql
+ - db
depends_on:
- db
networks:
diff --git a/nginx-docker.conf b/nginx-docker.conf
index e7db193..1f796df 100644
--- a/nginx-docker.conf
+++ b/nginx-docker.conf
@@ -1,6 +1,19 @@
server {
listen 0.0.0.0:80;
+ #listen 80 server;
+ #listen [::]:80 server;
+ #listen 443 ssl http2;
+ #listen [::]:443 ssl http2;
+
+ #ssl_certificate /etc/letsencrypt/live/vvveb.com/fullchain.pem;
+ #ssl_certificate_key /etc/letsencrypt/live/vvveb.com/privkey.pem;
+ #ssl_session_cache shared:SSL:20m;
+ #ssl_session_timeout 10m;
+ #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
+ #ssl_prefer_server_ciphers on;
+ #ssl_ciphers 'ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5';
+
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
@@ -9,6 +22,21 @@ server {
index index.php index.html;
error_page 404 /index.php;
+ gzip on;
+ gzip_vary on;
+ gzip_min_length 10240;
+ gzip_proxied any;
+ gzip_comp_level 6;
+ gzip_buffers 16 8k;
+ gzip_http_version 1.1;
+ gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
+
+ #charset utf-8;
+
+ add_header X-Frame-Options "SAMEORIGIN";
+ add_header X-XSS-Protection "1; mode=block";
+ add_header X-Content-Type-Options "nosniff";
+
set $skip_cache 0;
set $cache_uri $request_uri;
@@ -37,7 +65,23 @@ server {
}
#static files
- location ~* "\.(?!php)([\w]{3,4})$" {
+ #error_page 404 /index.php;
+ #error_page 404 /404.html;
+
+ location = /favicon.ico {
+ log_not_found off;
+ access_log off;
+ }
+
+ #add domain to sitemaps for multisite
+ location = /robots.txt {
+ log_not_found off;
+ access_log off;
+ try_files $uri /index.php$is_args$args;
+ }
+
+ #static files
+ location ~* "\.(?!php)([\w]{3,5})$" {
expires max;
log_not_found off;
sendfile on;
@@ -50,21 +94,31 @@ server {
location / {
default_type text/html;
index index.php index.html index.htm;
- try_files /page-cache/$http_host$cache_uri /page-cache/$http_host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
+ try_files /page-cache/$host$cache_uri /page-cache/$host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
#try_files $uri $uri/ /index.php$is_args$args;
#cache debug
#add_header "uri" $cache_uri;
+ #add_header "skip_cache" $skip_cache;
+
+ location ~ /media/.+?\.php$ {
+ deny all;
}
location ~ \.php$ {
# try_files $uri =404;
#fastcgi_pass unix:/var/run/php-fpm83/php-fpm.pid;
- fastcgi_pass php:9000;
+ #fastcgi_pass php:9000;
+ fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
+ }
+ }
+
+ location ~ /\.(?!well-known).* {
+ deny all;
}
}
diff --git a/nginx-live.conf b/nginx-live.conf
index 688519f..7679695 100755
--- a/nginx-live.conf
+++ b/nginx-live.conf
@@ -118,7 +118,7 @@ server {
location / {
default_type text/html;
index index.php index.html index.htm;
- try_files /page-cache/$http_host$cache_uri /page-cache/$http_host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
+ try_files /page-cache/$host$cache_uri /page-cache/$host$cache_uri/index.html $uri $uri/ /index.php$is_args$args;
#try_files $uri $uri/ /index.php$is_args$args;
#cache debug