The problem with: / / and Apache+Nginx?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Colleagues, please suggest how to solve the problem:

Want to see InstantCMS. Installed it on server running on Apache and Nginx.

After installation it shows only the home page, and when you try to click on any link it displays a message about 404 error.

I guess the problem with the overwriting of links, that is, mod_rewrite.

File .htaccess contains the following settings:
AddDefaultCharset windows-1251

RewriteEngine On
RewriteBase /
RewriteRule ^.htaccess$ - [F]

RewriteRule ^load/url=(.+)$ /index.php?uri=files&do=download&fileurl=$1
RewriteRule ^go/url=(.+)$ /index.php?uri=files&do=redirect&url=$1

RewriteCond %{REQUEST_URI} !\\.(jpg|jpeg|ico|gif|png|css|xml|js|pl|txt)$ [NC]
RewriteCond %{REQUEST_URI} !^/go/url=
RewriteCond %{REQUEST_URI} !^/load/url=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php?uri=$1 [L]

The virtual host is:

Options FollowSymLinks

AllowOverride All

I hope I managed to describe the problem. Can you suggest how to solve it?
by | 8 views

3 Answers

0 like 0 dislike
Who gives a 404 in apache or nginx? What's in the logs? mod_rewrite is enabled?
0 like 0 dislike
and Apache without nginx works fine? :) and then it says the problem is "a bunch", but apparently it is in Apache.
enable RewriteLog, let's see how and where it works. if necessary you can put here :)
0 like 0 dislike
Faced with a similar problem. To treat:

Include mod_rewrite (run in terminal):

sudo a2enmod rewrite

then go to default:

sudo gedit /etc/apache2/sites-enabled/000-default

and change there

AllowOverride None


AllowOverride All

Reload Apache:

sudo service apache2 restart

It should work.

Smoke Google if it doesn't work

Related questions

0 like 0 dislike
4 answers
0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
27,880 users