PHP now functional
This commit is contained in:
@@ -5,11 +5,12 @@ services:
|
|||||||
image: nginx:1.15.3-alpine-perl
|
image: nginx:1.15.3-alpine-perl
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
volumes:
|
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"
|
- "./Website:/var/www/html"
|
||||||
- "./etc/nginx/logs:/var/log/nginx"
|
- "./etc/nginx/logs:/var/log/nginx"
|
||||||
- "./etc/letsencrypt:/etc/letsencrypt"
|
- "./etc/letsencrypt:/etc/letsencrypt"
|
||||||
- "./etc/php:/etc/nginx/php"
|
#- "./etc/php:/etc/nginx/php"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
@@ -35,10 +36,10 @@ services:
|
|||||||
- privacy__useUpdateCheck=false
|
- privacy__useUpdateCheck=false
|
||||||
|
|
||||||
php:
|
php:
|
||||||
image: php:7.2.9-fpm-alpine3.6
|
image: nanoninja/php-fpm
|
||||||
container_name: php
|
container_name: php
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:9001:9000"
|
- "127.0.0.1:9000:9000"
|
||||||
volumes:
|
volumes:
|
||||||
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
|
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
|
||||||
- "./Website:/var/www/html"
|
- "./Website:/var/www/html"
|
||||||
@@ -79,7 +80,7 @@ services:
|
|||||||
image: phpmyadmin/phpmyadmin:latest
|
image: phpmyadmin/phpmyadmin:latest
|
||||||
container_name: phpmyadmin
|
container_name: phpmyadmin
|
||||||
ports:
|
ports:
|
||||||
- "9000:80"
|
- "55555:80"
|
||||||
environment:
|
environment:
|
||||||
- PMA_ARBITRARY=1
|
- PMA_ARBITRARY=1
|
||||||
- PMA_HOST=mysql
|
- PMA_HOST=mysql
|
||||||
|
|||||||
@@ -40,23 +40,23 @@ server {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/openrsc.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/openrsc.com/privkey.pem;
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/openrsc.com/chain.pem;
|
ssl_trusted_certificate /etc/letsencrypt/live/openrsc.com/chain.pem;
|
||||||
|
|
||||||
root /app;
|
root /var/www/html/;
|
||||||
index index.jsp index.html index.htm;
|
|
||||||
|
index index.php index.html index.htm index.jsp;
|
||||||
|
|
||||||
client_max_body_size 100M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
location / {
|
|
||||||
root /var/www/html;
|
|
||||||
}
|
|
||||||
|
|
||||||
####### Proxies #######
|
####### Proxies #######
|
||||||
# # PHP proxy
|
# PHP proxy
|
||||||
# location /board {
|
location ~ \.php$ {
|
||||||
# fastcgi_pass php:9001;
|
try_files $uri =404;
|
||||||
# fastcgi_index index.php;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
# include fastcgi.conf;
|
fastcgi_pass php:9000;
|
||||||
# root /app;
|
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
|
# Ghost proxy
|
||||||
location /blog {
|
location /blog {
|
||||||
@@ -75,4 +75,38 @@ server {
|
|||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://tomcat;
|
proxy_pass http://tomcat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
####### PHPBB #######
|
||||||
|
# Deny access to internal phpbb files.
|
||||||
|
location ~ /board(config\.php|common\.php|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
|
||||||
|
deny all;
|
||||||
|
# deny was ignored before 0.8.40 for connections over IPv6.
|
||||||
|
# Use internal directive to prohibit access on older versions.
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Correctly pass scripts for installer
|
||||||
|
location /install/ {
|
||||||
|
try_files $uri $uri/ @rewrite_installapp;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewrite_installapp {
|
||||||
|
rewrite ^(.*)$ /board/install/app.php/$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deny access to version control system directories.
|
||||||
|
location ~ /\.svn|/\.git {
|
||||||
|
deny all;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,16 +15,18 @@ server {
|
|||||||
error_log /var/log/nginx/error.log;
|
error_log /var/log/nginx/error.log;
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
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;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
####### Proxies #######
|
####### Proxies #######
|
||||||
# PHP proxy
|
# PHP proxy
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
#try_files $uri =404;
|
try_files $uri =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass php:9001;
|
fastcgi_pass php:9000;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
@@ -48,4 +50,38 @@ server {
|
|||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://tomcat;
|
proxy_pass http://tomcat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
####### PHPBB #######
|
||||||
|
# Deny access to internal phpbb files.
|
||||||
|
location ~ /board(config\.php|common\.php|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
|
||||||
|
deny all;
|
||||||
|
# deny was ignored before 0.8.40 for connections over IPv6.
|
||||||
|
# Use internal directive to prohibit access on older versions.
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Correctly pass scripts for installer
|
||||||
|
location /install/ {
|
||||||
|
try_files $uri $uri/ @rewrite_installapp;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
location @rewrite_installapp {
|
||||||
|
rewrite ^(.*)$ /board/install/app.php/$1 last;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deny access to version control system directories.
|
||||||
|
location ~ /\.svn|/\.git {
|
||||||
|
deny all;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user