Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Всем привет. Помогите до конца разобраться с реврайтами nginx, пожалуйста.

ЧПУ работает нормально, темы открываются, но единственная проблема с тем, что нельзя зайти в АЦ.

При таком конфиге (листать ниже)

location / {
        try_files $uri $uri/ /index.php?$args;
	}

    location /forum {
        try_files  $uri $uri/forum /forum/index.php;
        if (!-e $request_filename){
            rewrite \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /forum/forum/404error.php break;
        }

        if (!-e $request_filename){
            rewrite ^/forum/(.*)$ /forum/index.php last;
        }
    }

    location /forum/admin {
        try_files  $uri $uri/forum/admin /forum/admin/index.php;
        
        if (!-e $request_filename){
            rewrite ^/forum/admin/(.*)$ /forum/admin/index.php last;
        }
    }
    
    location ~ [^/]\.ph(p\d*|tml)$ {
		try_files /does_not_exists @php;
	}

	location @php {
		fastcgi_index index.php;
		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@club-source.ru";
		fastcgi_pass unix:/var/www/php-fpm/www-root.sock;
		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
		try_files $uri =404;
		include fastcgi_params;
	}
}

http://46.174.53.207/forum/admin при заходе в АЦ кидает в вечный редирект

Если сделать так (см ниже)

location / {
        try_files $uri $uri/ /index.php?$args;
	}

    location /forum {
        try_files  $uri $uri/forum /forum/index.php;
        if (!-e $request_filename){
            rewrite \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /forum/forum/404error.php break;
        }

        if (!-e $request_filename){
            rewrite ^/forum/(.*)$ /forum/index.php last;
        }
    }
    
    location ~ [^/]\.ph(p\d*|tml)$ {
		try_files /does_not_exists @php;
	}

	location @php {
		fastcgi_index index.php;
		fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f webmaster@club-source.ru";
		fastcgi_pass unix:/var/www/php-fpm/www-root.sock;
		fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
		try_files $uri =404;
		include fastcgi_params;
	}
}

То появляется ошибка при заходе в АЦ

Извините, возникла проблема

Страница, к которой вы обратились, не существует
Код ошибки: 1S160/2

Если же вообще удалить location forum, то ЧПУ перестает работать, но АЦ работает.

Edited by September^^

эм, не совсем гуру в этих вопросах... серт у меня есть, на домен

вчера домен был на хостинге, все было ок
сегодня все дело перенес на vps

и вот эта беда... что мне надо сделать?)

  • 2 years later...
  • Author

Тэкс, вот вернулся я обратно на IPS, настраиваю реврайты, и по гуглу наткнулся на свою тему (эту), она первая)

Проблема так и остается актуальной, при таком реврайте (первый пост) всё работает ОК, но в админку не заходит.

Кто-то может подсказать? Увы, у меня рабочий вариант не сохранился, сколько бы не игрался - не получается.

Всё, вспомнил как делал

 

location /forum/ {
		try_files  $uri $uri/ /forum/index.php;

		location ~^(/forum/page/).*(.php)$ {
			try_files  $uri $uri/forum /forum/index.php;
		}
	}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.