Hello, i was install centminmod on my test vps with 512mb ram, iam use xenforo and this is my step : change MariaDB character set and collation to utf8 add a domain with centmin.sh menu option #2 --> mydomain.com make database upload files to /home/nginx/domains/mydomain.com/public edit mydomain.com.conf like this tutorial but when i try to open on my browser, nginx test page still showing other question, before iam migrate my phpbb forum to xenforo and put this code on .htaccess files : Code: RewriteCond %{HTTP_HOST} !^www\.mydomain\.com$ [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC] RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC] RewriteCond %{QUERY_STRING} f=(\d+)$ [NC] RewriteRule ^(viewforum\.php|viewtopic\.php)$ /forums/%1? [L,R=301,NC] RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC] RewriteRule ^viewtopic\.php$ /posts/%2? [L,R=301,NC] iam confuse, on nginx where this code must to input or is unnecessary? please help me, any help would be appreciated and sorry if i post on wrong forum. best regards, maszd
Nginx doesn't support .htaccess or apache style mod_rewrites, you need to use Nginx rewrites within the actual Nginx domain vhost config file i.e. /usr/local/nginx/conf/conf.d/newdomain.com.conf see for Xenforo config guide at centminmod.com/nginx_configure_xenforo_seo_friendly_urls.html and examples posted at Xenforo - My Xenforo Nginx vhost configuration | Centmin Mod Community Unfortunately, I have no experience with phpBB and it's rewrites to Xenforo. For that you're better off asking at XenForo Community for example nginx rewrites for phpBB to Xenforo If test page is showing, make sure your domain's DNS records updated to point to server's IP address.
Oh quick search I found Redirection Scripts for phpBB 2.x | XenForo Community not sure if that helps.
hello, sorry for bother you again i was edit conf file on /usr/local/nginx/conf/conf.d/mydomain.com.conf for Xenforo Friendly Urls like this : Code: # redirect from non-www to www # uncomment, save file and restart Nginx to enable #server { # listen 80; # server_name mydomain.com; # return 301 $scheme://www.mydomain.com$request_uri; # } server { server_name mydomain.com www.mydomain.com; # ngx_pagespeed & ngx_pagespeed handler #include /usr/local/nginx/conf/pagespeed.conf; #include /usr/local/nginx/conf/pagespeedhandler.conf; #include /usr/local/nginx/conf/pagespeedstatslog.conf; # limit_conn limit_per_ip 16; # ssi on; access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=32k; error_log /home/nginx/domains/mydomain.com/log/error.log; root /home/nginx/domains/mydomain.com/public; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php?$uri&$args; } location /internal_data/ { internal; allow 127.0.0.1; deny all; } location /library/ { internal; allow 127.0.0.1; deny all; } # block common exploits, sql injections etc #include /usr/local/nginx/conf/block.conf; # Enables directory listings when index file not found #autoindex on; # Shows file listing times as local time #autoindex_localtime on; # Enable for vBulletin usage WITHOUT vbSEO installed #try_files $uri $uri/ /index.php; } include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; include /usr/local/nginx/conf/drop.conf; #include /usr/local/nginx/conf/errorpage.conf; } and then on putty iam run this command : and this message appear : its normal?
post the contents of /usr/local/nginx/conf/staticfiles.conf wrapped in CODE tags so we can see what line 1 of the file is
this is it : Code: location ~* \.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ { gzip_static off; #add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 30d; break; } location ~* \.(js)$ { #add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 30d; break; } location ~* \.(css)$ { #add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 30d; break; } location ~* \.(html|htm|txt)$ { #add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 1d; break; } location ~* \.(eot|svg|ttf|woff)$ { #add_header Pragma public; add_header Cache-Control "public, must-revalidate, proxy-revalidate"; access_log off; expires 30d; break; }
looks like you didn't wrap the curly braces properly for location / Code: # redirect from non-www to www # uncomment, save file and restart Nginx to enable #server { # listen 80; # server_name mydomain.com; # return 301 $scheme://www.mydomain.com$request_uri; # } server { server_name mydomain.com www.mydomain.com; # ngx_pagespeed & ngx_pagespeed handler #include /usr/local/nginx/conf/pagespeed.conf; #include /usr/local/nginx/conf/pagespeedhandler.conf; #include /usr/local/nginx/conf/pagespeedstatslog.conf; # limit_conn limit_per_ip 16; # ssi on; access_log /home/nginx/domains/mydomain.com/log/access.log combined buffer=32k; error_log /home/nginx/domains/mydomain.com/log/error.log; root /home/nginx/domains/mydomain.com/public; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php?$uri&$args; } location /internal_data/ { internal; allow 127.0.0.1; deny all; } location /library/ { internal; allow 127.0.0.1; deny all; } include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; include /usr/local/nginx/conf/drop.conf; #include /usr/local/nginx/conf/errorpage.conf; }