I'm trying to get the ckeditor to work with ckfinder, the problem are when i'm running the editor whitout a proxy on NGINX its working as is shut be, but when i'm working with my proxy its will not late me upload files and see files.
i will show both my config files for NGINX my server config and my proxy config.
Server config:
Where the backend are on, and where ckfinder and ckeditor running.
server {
root /var/www/domain-com/backend;
index index.php index.html index.htm;
server_name domain.com;
client_max_body_size 256M;
location ~ \.php$ {
try_files $uri $uri/ /index.php?$args;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
}
# Folders to block
location ^~ /Controller/ { deny all; }
location ^~ /Cron/ { deny all; }
location ^~ /Framework/ { deny all; }
location /json/ {
try_files $uri $uri/ /json.php?$args;
}
location /action/ {
try_files $uri $uri/ /action.php?$args;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
}
Proxy config
This is my config for the proxy server there control everything before its sending out to the backend server.
server {
listen 443 ssl;
root /var/www;
index index.php index.html;
client_max_body_size 256M;
server_name domain.com;
gzip on;
gzip_proxied any;
gzip_types text/css text/plain text/xml application/xml applicati$
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
# SSL Config setup
ssl on;
ssl_certificate /home/www-data/ssl/ssl-key.pem;
ssl_certificate_key /home/www-data/ssl/ssl-key.key;
ssl_stapling on;
ssl_session_timeout 10m;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# Error pages if user is blocked
error_page 403 /e403.php;
location = /e403.php {
allow all;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location / {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_read_timeout 1d;
proxy_set_header Host $host;
proxy_pass http://domain_server_config$uri?$args;
}
}
Your proxy server has two location blocks which intercept URIs ending with .php
. If your proxy server is intended to forward everything unmolested, there is no reason for it to execute PHP files locally.
Your existing applications probably use pretty permalinks (or similar) which disguises the fact that PHP is the engine behind the website.
I suspect that the tasks that so not work, expose a URI containing the pattern .php
.