Corrections for Nginx and Ghost
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -30,8 +30,6 @@ Splunk/opt-splunk-var/*
|
|||||||
|
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
etc/nginx/default.conf
|
|
||||||
|
|
||||||
etc/logs/nginx/*.log
|
etc/logs/nginx/*.log
|
||||||
etc/logs/letsencrypt/*
|
etc/logs/letsencrypt/*
|
||||||
etc/ghost/logs/*.log
|
etc/ghost/logs/*.log
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:2368:2368"
|
- "127.0.0.1:2368:2368"
|
||||||
restart: always
|
restart: always
|
||||||
#env_file:
|
env_file:
|
||||||
# - ".env"
|
- ".env"
|
||||||
volumes:
|
volumes:
|
||||||
- "./etc/ghost/content:/var/lib/ghost/content"
|
- "./etc/ghost/content:/var/lib/ghost/content"
|
||||||
environment:
|
environment:
|
||||||
@@ -89,6 +89,8 @@ services:
|
|||||||
- database__connection__password=root
|
- database__connection__password=root
|
||||||
- database__connection__database=ghost
|
- database__connection__database=ghost
|
||||||
- privacy__useUpdateCheck=false
|
- privacy__useUpdateCheck=false
|
||||||
|
depends_on:
|
||||||
|
- mysqldb
|
||||||
|
|
||||||
php:
|
php:
|
||||||
image: nanoninja/php-fpm:7.2
|
image: nanoninja/php-fpm:7.2
|
||||||
|
|||||||
@@ -36,12 +36,9 @@ server {
|
|||||||
ssl_stapling on;
|
ssl_stapling on;
|
||||||
ssl_stapling_verify on;
|
ssl_stapling_verify on;
|
||||||
resolver 8.8.8.8 1.1.1.1;
|
resolver 8.8.8.8 1.1.1.1;
|
||||||
# ssl_certificate /etc/letsencrypt/live/openrsc.com/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/openrsc.com/fullchain.pem;
|
||||||
# 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;
|
||||||
ssl_certificate /etc/letsencrypt/live/localhost/selfsigned.crt;
|
|
||||||
ssl_certificate_key /etc/letsencrypt/live/localhost/selfsigned.key;
|
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/localhost/dhparam.pem;
|
|
||||||
|
|
||||||
root /app;
|
root /app;
|
||||||
index index.jsp index.html index.htm;
|
index index.jsp index.html index.htm;
|
||||||
|
|||||||
53
etc/nginx/default.conf
Executable file
53
etc/nginx/default.conf
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
upstream tomcat {
|
||||||
|
server tomcat:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream ghost {
|
||||||
|
server ghost:2368;
|
||||||
|
}
|
||||||
|
|
||||||
|
# HTTP
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server ipv6only=on;
|
||||||
|
server_name ${NGINX_HOST};
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
|
root /app;
|
||||||
|
index index.jsp index.html index.htm;
|
||||||
|
|
||||||
|
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;
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Ghost proxy
|
||||||
|
location /blog {
|
||||||
|
proxy_pass http://ghost;
|
||||||
|
proxy_set_header Host $http_host; # required for docker client's sake
|
||||||
|
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Tomcat proxy
|
||||||
|
location ~ \.jsp$ {
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Server $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_pass http://tomcat;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user