Drupal 7 + phpbb3 + nginx

Главные вкладки

Аватар пользователя IgorPr IgorPr 7 января 2015 в 4:43

Доброго времени суток. Есть сайт на друпал, было решено прикрутить форум, для этой роли был выбран phpbb3. Создал каталог /forum в проекте, залил phpbb и на этом всё... При обращении к drupalproject/forum получаю сообщение о том, что страница не найдена.

Гуглил примеры настроек, но попытки пляски с конфигом результата не дали. Помогите пожалуйста настроить конфиг.

server {
    listen *:80;

    server_name project.net;

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    root /srv/project.net;
    index index.html index.htm index.php;

    # Enable compression, this will help if you have for instance advagg�~@~N module
        # by serving Gzip versions of the files.
        gzip_static on;

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

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

        location = /yandex {
                allow all;
                log_not_found off;
                access_log off;
        }

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

        # No no for private
        location ~ ^/sites/.*/private/ {
                return 403;
        }

        # Block access to "hidden" files and directories whose names begin with a
        # period. This includes directories used by version control systems such
        # as Subversion or Git to store control files.
        location ~ (^|/)\. {
                return 403;
        }

        #location / {
        # This is cool because no php is touched for static content
        #        try_files $uri rewrite;
        #}

        location [user=rewrite]rewrite[/user] {
                # You have 2 options here
                # For D7 and above:
                # Clean URLs are handled in drupal_environment_initialize().
                rewrite ^ /index.php;
        }
 
        # Fighting with Styles? This little gem is amazing.
        # This is for D7 and D8
        location ~ ^/sites/.*/files/styles/ {
                try_files $uri [user=rewrite]rewrite[/user];
        }

        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }

    location ~ [^/]\.php(/|$) {
        fastcgi_index index.php;
        include fcgi.conf;
        fastcgi_pass unix:/var/run/php-fcgi-0.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    }

    location  / {

        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_intercept_errors on;
        try_files $uri [user=rewrite]rewrite[/user];

        fastcgi_index index.php;
        include fcgi.conf;
        fastcgi_pass unix:/var/run/php-fcgi-1.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

    }

}

Комментарии