Running Concrete5 behind nginx proxy
Permalink
Hi all,
Newbie here.
I am running Concrete5 (8.4.0) on Debian Stretch and am able to work with it just fine when I connect to it via a SSH tunnel. I would however like to run Concrete5 behind a nginx proxy on the Internet. With Concrete5 behind a nginx proxy, I am unable to install it as it gets stuck on "Concrete5 cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server".
The current nginx config reads:
I tried various things I found in the forum and on the web, such as changing index.php as follows:
and adding the following to the location / section:
Any suggestions?
kind regards,
Jan
Newbie here.
I am running Concrete5 (8.4.0) on Debian Stretch and am able to work with it just fine when I connect to it via a SSH tunnel. I would however like to run Concrete5 behind a nginx proxy on the Internet. With Concrete5 behind a nginx proxy, I am unable to install it as it gets stuck on "Concrete5 cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server".
The current nginx config reads:
server { # SSL configuration listen 443 ssl; listen [::]:443 ssl; server_name www.<domain>; ssl on; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; access_log /var/log/nginx/www.<domain>-access.log; error_log /var/log/nginx/www.<domain>-error.log; location / {
Viewing 15 lines of 24 lines. View entire code block.
I tried various things I found in the forum and on the web, such as changing index.php as follows:
<?php $_SERVER["PATH_INFO"] = $_SERVER["REQUEST_URI"]; require 'concrete/dispatcher.php';
and adding the following to the location / section:
fastcgi_param PATH_INFO $request_uri;
Any suggestions?
kind regards,
Jan
2020 - Still impossible to run https concrete5 behind a NGINX reverse Proxy.
Hi, I was in a situation like you.
First: you need a big coup of excellent coffee
Two:https://github.com/chobits/ngx_http_proxy_connect_module...
read the content, download the master, unzip an apply (patch -p1 < patch_file)
the correct patch to your nginx source tree
Three: use gcc11 and llvm11 and setup the correct environment variables
Four: download source, decompress and make available openssl 1.1.1i
to the nginx config settings
Once you correctly select your options for the environment you're trying to
setup, run nginx ./configure -.-.-.- include the module path, openssl, and voile!
you got it, an ssl reverse proxy correctly running.
Of course, add to index.php
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
$_SERVER['HTTPS']='on';
}
First: you need a big coup of excellent coffee
Two:https://github.com/chobits/ngx_http_proxy_connect_module...
read the content, download the master, unzip an apply (patch -p1 < patch_file)
the correct patch to your nginx source tree
Three: use gcc11 and llvm11 and setup the correct environment variables
Four: download source, decompress and make available openssl 1.1.1i
to the nginx config settings
Once you correctly select your options for the environment you're trying to
setup, run nginx ./configure -.-.-.- include the module path, openssl, and voile!
you got it, an ssl reverse proxy correctly running.
Of course, add to index.php
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
$_SERVER['HTTPS']='on';
}
Of course this is possible and here's a very detailed tutorial on how to do it:
https://mlocati.github.io/articles/nginx-apache-concrete5.html...
I run many sites with proxy.
https://mlocati.github.io/articles/nginx-apache-concrete5.html...
I run many sites with proxy.