Commit db43098d authored by Romain Loth's avatar Romain Loth

updated real-world conf

parent 7eb215ba
# Full server config: php comex as root and regcomex as subpath
# =============================================================
# Full server config: php comex as root and api + reg as services subpath
# ========================================================================
server {
listen 80 ;
listen [::]:80 ;
# in production
# server_name communityexplorer.org
server_name _;
# server_name communityexplorer.org;
server_name _ ;
# adapt path to your php docroot
root /var/www ;
# get the logs in a custom place
# (adapt paths)
access_log /home/ubuntu/active_webapps/outer_nginx_access.log ;
error_log /home/ubuntu/active_webapps/outer_nginx_error.log ;
# independant app with its own nginx serving:
# the php root on '/'
# the python server on 'services/'
location / {
index index.html index.php ;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
# here we adapted $documentroot to our real php docroot
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
# ---------
}
# no root here => independant app
# (but /locationpath must match this app's default route)
location /regcomex {
# point to app container's redirected port
proxy_pass http://0.0.0.0:32790;
# pointing to local bridge to the dockerized nginx serving all comex2 parts
proxy_pass http://0.0.0.0:8080;
proxy_redirect off;
# useful to keep track of original IP before reverse-proxy
......@@ -36,22 +25,6 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
# get the logs in a custom place
# (adapt paths)
access_log /home/ubuntu/active_webapps/regcomex/logs/nginx/access.log ;
# error_log /home/ubuntu/active_webapps/regcomex/logs/nginx/error.log debug;
error_log /home/ubuntu/active_webapps/regcomex/logs/nginx/error.log ;
}
# faster static serving
location /static {
alias /home/ubuntu/active_webapps/regcomex/static;
autoindex on;
}
location ~ /\.ht {
deny all;
}
# for minidoors api
......@@ -63,5 +36,5 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment