Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
mark2012 Posted June 4, 2013 Posted June 4, 2013 Hello Yesterday i start to configure nginx with php-fpm and i`m having some hard time making the forum working properly. Main problems are threads,topics,gallery,blog and other pages where the web server found them as 404 error. The only page who does working is the index. Assuming one of the problem it may be regarding apache directives which i have added to nginx conf file reading from many other tutorials but one thing i do not found in those tutorials : the structure of the files from the disk. Im using this structure : /var/www/<domain name>/<php and html files> PS: The php it does working, theres no problem regarding this aspect. Could anybody point me to the right direction please in order to make neccesarly changes to nginx conf file regarding ALL htaccess files from IPB script to my above files structure?
Dmacleo Posted June 4, 2013 Posted June 4, 2013 you add this to the conf file for the domain? #rewrite rules for IPB try_files $uri $uri/ /index.php?q=$request_uri; I have it right below index index.php index.html index.htm; in mine the resatrt php-fpm/nginx
mark2012 Posted June 4, 2013 Author Posted June 4, 2013 Hi again and thanks for answering dmacleo, Let me give some details about my IPB installation. The filesystem structure looks like this: /var/www/example.com <- This is the root directory of the website; /var/www/example.com/forum <- this is the IPB root directory, where all the php and other resources reside. When a client hits http://example.com, /var/www/example.com/index.php is being served, which is nothing else but the IP.content application. Under my current apache setup, a regular forum url looks like this: http://example.com/forum/forum/<forum section goes here> Under nginx this URL schema does not work and I'm not sure how to make it work. Can someone provide some insight on this? Thank you very much.
Dmacleo Posted June 5, 2013 Posted June 5, 2013 I don't have one under /forums to test but I thought that code worked no matter what. its basically the htaccess just for nginx as it does not use nginx. if using furls you have to put rewrite rules in the conf file no matter what, thats all that was is a rewrite rule. but as a temp workaround you could disable furls (uncheck the use furl and use htaccess then recache furls) while someone that knows for sure weighs in. I'll take a GUESS though, maybe #rewrite rules for IPB try_files $uri $uri/ /forum/index.php?q=$request_uri; and are you really using a /forum/forum/name format as you said above or was that <forum section goes here> meant to be in place of the last /forum?
mark2012 Posted June 5, 2013 Author Posted June 5, 2013 I don't have one under /forums to test but I thought that code worked no matter what. its basically the htaccess just for nginx as it does not use nginx. if using furls you have to put rewrite rules in the conf file no matter what, thats all that was is a rewrite rule. but as a temp workaround you could disable furls (uncheck the use furl and use htaccess then recache furls) while someone that knows for sure weighs in. I'll take a GUESS though, maybe #rewrite rules for IPB try_files $uri $uri/ /forum/index.php?q=$request_uri; and are you really using a /forum/forum/name format as you said above or was that <forum section goes here> meant to be in place of the last /forum? Thank you. Your directive is correct , and this is the full one: location /var/www/etcpathtoforums/ { index index.php index.htm index.html; try_files $uri $uri/ /pathtoforums/index.php?q=$uri; } My forum works great, all topics, forums,sub-forums everything is fine except ip content`s pages. All receiving page cannot be found error. PS: not using furl
Dmacleo Posted June 5, 2013 Posted June 5, 2013 should be able to use furls now too then, click use htaccess (even though you are not) and recache and it should work, makes them look better. if ip.content has use htaccess checked and you are not choosing use furls in board causes this iirc.
Makoto Posted June 5, 2013 Posted June 5, 2013 Please see my thread for properly setting up IP.Board with NGiNX. http://community.invisionpower.com/topic/384522-how-to-set-up-a-secure-ipboard-installation-with-nginx-and-php-fpm/ # Set up rewrite rules. location / { try_files $uri $uri/ /index.php; } location ~^(/page/).*(.php)$ { try_files $uri $uri/ /index.php; } Edit: I'm getting real sick of IP.Boards editor constantly cutting off my posts after code boxes, I'm not reposting everything I had here again.
Dmacleo Posted June 5, 2013 Posted June 5, 2013 I'm not using a /page/ location rule BUT, and this is probably why it works, I have ip content set as default app using constants.php never thought about that when I posted, and I should have. sorry.
mark2012 Posted June 5, 2013 Author Posted June 5, 2013 Thank you very much guys, Unfortunetly i`ve been under heavely ddos attack for more than 16 hours, right now hoping to be able to make the final adjustments.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.