diff --git a/docker-compose.yml b/docker-compose.yml index bf1f1fd..8e9064a 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,11 +5,12 @@ services: 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" + #- "./etc/php:/etc/nginx/php" ports: - "80:80" - "443:443" @@ -35,10 +36,10 @@ services: - privacy__useUpdateCheck=false php: - image: php:7.2.9-fpm-alpine3.6 + image: nanoninja/php-fpm container_name: php ports: - - "127.0.0.1:9001:9000" + - "127.0.0.1:9000:9000" volumes: - "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini" - "./Website:/var/www/html" @@ -79,7 +80,7 @@ services: image: phpmyadmin/phpmyadmin:latest container_name: phpmyadmin ports: - - "9000:80" + - "55555:80" environment: - PMA_ARBITRARY=1 - PMA_HOST=mysql 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|(?