PHP now functional
This commit is contained in:
@@ -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|(?<!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;
|
||||
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;
|
||||
|
||||
####### Proxies #######
|
||||
# PHP proxy
|
||||
location ~ \.php$ {
|
||||
#try_files $uri =404;
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9001;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
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_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