Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Nginx] Enabling Search Engine Friendly URLs
#31
I use Nginx with MyBB and there are no problems with that, what error you get now with the config i give you?
Paid support or developement: www.broatcast-consulting.de
All other: blog.broatcast.de

[Image: EbbMWfN.png]

Reply
#32
(09-04-2017, 08:06 PM)Machine Wrote:
(09-04-2017, 07:55 PM)broatcast Wrote: .....
I tried the codes you gave but I get the same error again. I think mybb url structure is not working on nginx.
The MyBB developer team needs to work on this. I guess I'll reinstall the forum this time without nginx Sad

Here's my config file in case you want to see. It is working fine.


PHP Code:
server {
        listen 80;
        listen [::]:80;
        root /var/www/mybb.com/html;
        index index.php index.html index.htm;

        server_name www.mybb.com mybb.com;

        location / {
                try_files $uri $uri/ = 404;
                rewrite ^/([^&]*)&(.*)$ http://www.mybb.com/$1?$2 permanent;
rewrite ^/((?i)sitemap-([^./]+)\.xml)$ /misc.php?google_seo_sitemap=$2;
rewrite ^/((?i)Forum-([^./]+))$ /forumdisplay.php?google_seo_forum=$2;
rewrite ^/((?i)Thread-([^./]+))$ /showthread.php?google_seo_thread=$2;
rewrite ^/((?i)Announcement-([^./]+))$ /announcements.php?google_seo_announcement=$2;
rewrite ^/((?i)User-([^./]+))$ /member.php?action=profile&google_seo_user=$2;
rewrite ^/((?i)Calendar-([^./]+))$ /calendar.php?google_seo_calendar=$2;
rewrite ^/((?i)Event-([^./]+))$ /calendar.php?action=event&google_seo_event=$2;
        }

        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php5-fpm-mybb.com.sock;
        }

        location ~ /\.ht {
                deny all;
        }

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)