diff --git a/.gitignore b/.gitignore index 1cabde3..4b5abd7 100755 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,5 @@ etc/ghost/content/data/\.DS_Store etc/ghost/content/themes/ etc/ghost/content/logs/*.log.* + +etc/ghost/content/data/ghost\.db diff --git a/docker-compose.yml b/docker-compose.yml index afbd210..8e9064a 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,13 +2,15 @@ version: '3.1' services: nginx: - image: nginx:latest + image: nginx:1.15.3-alpine-perl container_name: nginx volumes: - - "./etc/nginx:/etc/nginx/conf.d" + #- "./etc/nginx:/etc/nginx/conf.d" + - "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf" - "./Website:/var/www/html" - "./etc/nginx/logs:/var/log/nginx" - "./etc/letsencrypt:/etc/letsencrypt" + #- "./etc/php:/etc/nginx/php" ports: - "80:80" - "443:443" @@ -19,17 +21,38 @@ services: - tomcat - mysqldb - myadmin: - image: phpmyadmin/phpmyadmin:latest - container_name: phpmyadmin + ghost: + image: ghost:2.0.3-alpine + container_name: ghost ports: - - "9000:80" - environment: - - PMA_ARBITRARY=1 - - PMA_HOST=mysql + - "127.0.0.1:2368:2368" restart: always - depends_on: - - mysqldb + env_file: + - ".env" + volumes: + - "./etc/ghost/content:/var/lib/ghost/content" + environment: + - url=${URL} + - privacy__useUpdateCheck=false + + php: + image: nanoninja/php-fpm + container_name: php + ports: + - "127.0.0.1:9000:9000" + volumes: + - "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini" + - "./Website:/var/www/html" + + tomcat: + image: tomcat:latest + container_name: tomcat + ports: + - "127.0.0.1:8080:8080" + restart: always + volumes: + - "./Website:/usr/local/tomcat/webapps/ROOT" + - "./etc/tomcat:/usr/local/tomcat/conf" mysqldb: image: mariadb:latest @@ -53,33 +76,14 @@ services: - "./data/db/mysql:/var/lib/mysql" - "./etc/mariadb/innodb.cnf:/etc/mysql/conf.d/innodb.cnf:ro" - tomcat: - image: tomcat:latest - container_name: tomcat + myadmin: + image: phpmyadmin/phpmyadmin:latest + container_name: phpmyadmin ports: - - "8080:8080" - restart: always - volumes: - - "./Website:/usr/local/tomcat/webapps/ROOT" - - "./etc/tomcat:/usr/local/tomcat/conf" - - ghost: - image: ghost:latest - container_name: ghost - ports: - - "127.0.0.1:2368:2368" - restart: always - env_file: - - ".env" - volumes: - - "./etc/ghost/content:/var/lib/ghost/content" + - "55555:80" environment: - - url=${URL} - - privacy__useUpdateCheck=false - - php: - image: nanoninja/php-fpm:7.2 - container_name: php - volumes: - - "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini" - - "./Website:/var/www/html/public" + - PMA_ARBITRARY=1 + - PMA_HOST=mysql + restart: always + depends_on: + - mysqldb diff --git a/etc/nginx/HTTPS_default.conf.BAK b/etc/nginx/HTTPS_default.conf.BAK index e120cc8..838581c 100755 --- a/etc/nginx/HTTPS_default.conf.BAK +++ b/etc/nginx/HTTPS_default.conf.BAK @@ -40,23 +40,23 @@ server { ssl_certificate_key /etc/letsencrypt/live/openrsc.com/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/openrsc.com/chain.pem; - root /app; - index index.jsp index.html index.htm; + root /var/www/html/; + + index index.php index.html index.htm index.jsp; client_max_body_size 100M; - location / { - root /var/www/html; - } - ####### Proxies ####### -# # PHP proxy -# location /board { -# fastcgi_pass php:9001; -# fastcgi_index index.php; -# include fastcgi.conf; -# root /app; -# } + # PHP proxy + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass php:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } # Ghost proxy location /blog { @@ -75,4 +75,38 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://tomcat; } + + ####### PHPBB ####### + # Deny access to internal phpbb files. + location ~ /board(config\.php|common\.php|files|images/avatars/upload|includes|(?