没有代理工作,代理在CKEditor中做somthin wird



我正在尝试让 ckeditor 使用 ckfinder,问题是当我在 NGINX 上运行编辑器时,它的工作就像关闭一样,但是当我使用我的代理时,它不会迟到我上传文件并查看文件。

我将显示我的 NGINX 配置文件我的服务器配置和我的代理配置。

服务器配置:

后端所在的位置,以及 ckfinder 和 ckeditor 运行的位置。

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;
        }
}

代理配置

这是我对代理服务器的配置,在发送到后端服务器之前控制所有内容。

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;
        }
}

您的代理服务器有两个位置块,用于拦截以 .php 结尾的 URI。如果您的代理服务器旨在转发所有不受干扰的内容,则它没有理由在本地执行PHP文件。

您现有的应用程序可能使用漂亮的永久链接(或类似链接(,这掩盖了PHP是网站背后的引擎的事实。

我怀疑不起作用的任务会公开包含模式的 URI .php.

最新更新