Corrections for Nginx and Ghost
This commit is contained in:
@@ -36,12 +36,9 @@ server {
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver 8.8.8.8 1.1.1.1;
|
||||
# ssl_certificate /etc/letsencrypt/live/openrsc.com/fullchain.pem;
|
||||
# ssl_certificate_key /etc/letsencrypt/live/openrsc.com/privkey.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;
|
||||
ssl_certificate /etc/letsencrypt/live/openrsc.com/fullchain.pem;
|
||||
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;
|
||||
|
||||
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