Nginx + Wysiwyg + Редактор


У меня есть несколько сайтов, запущенных на Nginx, но редактор не загружается. Wysiwyg правильно настроен с загруженным редактором и в каталоге библиотек.

На данный момент я не уверен, что мне чего-то не хватает или что-то в моей конфигурации блокирует это.

Текущая конфигурация следующая.

#######################################################
### nginx.conf catch-all
#######################################################

client_max_body_size 75M;

gzip_static on;
gzip on;
gzip_comp_level 9;
gzip_types application/x-javascript text/css text/plain text/xml application/xml application/xml+rss text/javascript;

location = /favicon.ico {
    log_not_found off;
    access_log off;
}

location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
}

# This is mostly based on Drupal's stock .htaccess
location ~* ^.+(\.(txt|engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|/Entries.*|/Repository|/Root|/Tag|/Template)$ {
    return 404;
}

# serve static files directly
location ~* ^.+\.(jpg|jpeg|gif|png|ico|swf|flv)$ {
    access_log off;
    expires 30d;
}

# Very rarely should these ever be accessed outside of your lan
location ~* \.(txt|log)$ {
    allow 192.168.0.0/16;
    deny all;
}

location ~ \..*/.*\.php$ {
    return 403;
}

## Deny some crawlers
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww) ) {
    return 444;
}

## Deny certain Referers (case insensitive)
if ($http_referer ~* (poker|sex|girl) ) {
    return 444;
}

## 6.x starts
location / {
    rewrite ^/(.*)/$ /$1 permanent; # remove trailing slashes - disabled
    try_files $uri @cache;
}

location @cache {
    if ( $request_method !~ ^(GET|HEAD)$ ) {
        return 405;
    }

    if ($http_cookie ~ "DRUPAL_UID") {
        return 405;
    }

    error_page 405 = @drupal;
    add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT"; 
    add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
    add_header X-Header "Boost Citrus 1.9"; 
    charset utf-8;
    try_files /cache/normal/$host${uri}_$args.html /cache/$host${uri}_$args.html @drupal;
}

location @drupal {
    rewrite ^/(.*)$ /index.php?q=$1 last;
}

location ~* (/\..*|settings\.php$|\.(htaccess|engine|inc|info|install|module|profile|pl|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(Entries.*|Repository|Root|Tag|Template))$ {
    deny all;
}

location ~* /files/.*\.php$ {
    return 444;
}

location ~* /themes/.*\.php$ {
    return 444;
}

location ~ \.css$ {
    if ( $request_method !~ ^(GET|HEAD)$ ) {
        return 405;
    }

    if ($http_cookie ~ "DRUPAL_UID") {
        return 405;
    }

    error_page 405 = @uncached;
    access_log off;
    expires max; #if using aggregator
    add_header X-Header "Boost Citrus 2.1";
    try_files /cache/perm/$host${uri}_.css /cache/$host${uri}_.css $uri =404;
}

location ~ \.js$ {
    if ( $request_method !~ ^(GET|HEAD)$ ) {
        return 405;
    }

    if ($http_cookie ~ "DRUPAL_UID") {
        return 405;
    }

    error_page 405 = @uncached;
    access_log off;
    expires max; # if using aggregator
    add_header X-Header "Boost Citrus 2.2"; 
    try_files /cache/perm/$host${uri}_.js /cache/$host${uri}_.js $uri =404;
}

location ~ \.json$ {
    if ( $request_method !~ ^(GET|HEAD)$ ) {
    return 405;
    }

    if ($http_cookie ~ "DRUPAL_UID") {
    return 405;
    }

    error_page 405 = @uncached;
    access_log off;
    expires max; # if using aggregator
    add_header X-Header "Boost Citrus 2.3"; 
    try_files /cache/normal/$host${uri}_.json /cache/$host${uri}_.json $uri =404;
}

location @uncached {
    access_log off;
    expires max; # max if using aggregator, otherwise sane expire time
}

location ^~ /sites/default/files/imagecache/ {
    index index.php index.html;

    # assume a clean URL is requested, and rewrite to index.php
    if (!-e $request_filename) {
        rewrite ^/(.*)$ /index.php?q=$1 last;
        break;
    }
}

location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ {
    access_log off;
    expires max;
    try_files $uri =404;
}

location ~* \.xml$ {
    if ( $request_method !~ ^(GET|HEAD)$ ) {
        return 405;
    }
    if ($http_cookie ~ "DRUPAL_UID") {
        return 405;
    }
    error_page 405 = @drupal;
    add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
    add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
    add_header X-Header "Boost Citrus 2.4"; 
    charset utf-8;
    types { }
    default_type application/rss+xml;
    try_files /cache/normal/$host${uri}_.xml /cache/normal/$host${uri}_.html /cache/$host${uri}_.xml $uri @drupal;
}

location ~* /feed$ {
    if ( $request_method !~ ^(GET|HEAD)$ ) {
        return 405;
    }
    if ($http_cookie ~ "DRUPAL_UID") {
        return 405;
    }
    error_page 405 = @drupal;
    add_header Expires "Tue, 24 Jan 1984 08:00:00 GMT";
    add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
    add_header X-Header "Boost Citrus 2.5"; 
    charset utf-8;
    types { }
    default_type application/rss+xml;
    try_files /cache/normal/$host${uri}_.xml /cache/normal/$host${uri}_.html /cache/$host${uri}_.xml $uri @drupal;
}

#######################################################
### nginx.conf catch-all
#######################################################

Я удалил модуль WYSIWYG, переустановил его, и он не может видеть CKEditor. Если я вставлю URL-адрес в адресную строку, я может получить доступ к CKeditor.js файл напрямую.

 1
Author: kiamlaluno, 2011-06-17

1 answers

Убедитесь, что у вас не установлен CKEditor дважды. Это легко сделать с помощью модуля CKEditor (который я использовал на старых сайтах) и модуля WYSIWYG, для которого требуется CKEditor в другом каталоге.
У WYSIWYG есть проблемы с обнаружением более новых версий CKEditor. В очереди проблем есть несколько связанных проблем. Понижение рейтинга было самым простым способом решить эту проблему.
Передовые функции CDN могут вести себя плохо или взаимодействовать неожиданным образом.

 3
Author: G.Martin, 2020-04-12 22:13:12