Post by Weiqunw » Wed Dec 01, 2021 11:11 pm

Something strange. We have our OC 2.3.0.2. webshop on a Nginx server.

I have installed a copy of our live shop on a subdomain, when I am visiting the index.php from my computer the works... but this doesn't always work on all devices.

When I am visiting the subdomain index.php from our office or on my or a collegues mobile with WiFi, it works!
But when I have disabled WiFi with mobile internet enabled, the index.php file says Forbidden. The admin/index.php does always works. Switching back to WiFi and the index.php works just as it should. Also from my internet connection from home I can't visit the page. It keeps saying Forbidden.

I think that this is related to the nginx.conf file, I tried some things but I can't find the right settings. These settings are the same as on our live shop on the normal domain.

Anybody experienced this?

Current .conf file

Code: Select all

location ~* /admin {
        index index.php;
	try_files $uri $uri/ /index.php?_route_=$1;

	location ~ \.php$ {
        	echo_exec @main;
    	}
   }

location  ~* ^\/.* {
       try_files $uri @opencart;

	location ~ \.php$ {
        	echo_exec @main;
    	}
}

location @opencart {
        rewrite ^/(.+)$ /index.php?_route_=$1 last;
    }

Last edited by Weiqunw on Wed Dec 01, 2021 11:14 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by JNeuhoff » Wed Dec 01, 2021 11:13 pm

Could be a firewall issue, maybe your IP-address is blacklisted?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Weiqunw » Wed Dec 01, 2021 11:15 pm

It couldn't be, when I add a simple index.php file with only echo Hello world, it is working with no problem.
But switching back to the OpenCart index.php it says Forbidden again.. but not on every connection.

On my own mobile I can connect from mobile internet and WiFi, but on my 2 collegues mobile phones it doesn't work from mobile internet, switching back to Wifi and it is working again. They never visited the page before so a IP block should be impossible.

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by xxvirusxx » Wed Dec 01, 2021 11:20 pm

You have checked .htaccess file?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Weiqunw » Wed Dec 01, 2021 11:25 pm

Nginx doesn't use Htacccess :(

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by JNeuhoff » Wed Dec 01, 2021 11:36 pm

Have you done any other modifications to your OpenCart site? Or added some 3rd party extensions?

What are the exact mobile devices for which your website doesn't work? Are they iPhones?

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Weiqunw » Wed Dec 01, 2021 11:42 pm

Yeah there are modifications, but that can't be the problem.

On my personal mobile it works from mobile + wifi, but when I am visiting the page from my PC at home it says forbidden. When I connect my mobile at home on wifi it is also saying forbidden. This could be because the IP is the same.

No, one collegue has a iphone, the other a android device.

Does this work for you?
Last edited by Weiqunw on Tue Dec 07, 2021 5:19 pm, edited 1 time in total.

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by Weiqunw » Wed Dec 01, 2021 11:48 pm

I have just made a copy of another live shop on a different domain to a subdomain just to test, it is the same nginx server. Same issue it keeps saying Forbidden but not from every connection :crazy:

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by Weiqunw » Wed Dec 01, 2021 11:55 pm

The index.php file doesn't always work depending on the connection, but the admin/index.php file always works from every connection.

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by xxvirusxx » Wed Dec 01, 2021 11:58 pm

Weiqunw wrote:
Wed Dec 01, 2021 11:25 pm
Nginx doesn't use Htacccess :(
No, but Opencart has.

LE. Yes, website work.

Your website respond to ping?

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by Weiqunw » Thu Dec 02, 2021 12:11 am

The htaccess file is still in the public_html folder.

I checked the nginx access log and I did see the following. Could this be something?

The normal IP is from my internet connection, where I can visit the page.
The long address starting with 2a02 is from a mobile on mobile internet where it shows Forbidden.

Image

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by JNeuhoff » Thu Dec 02, 2021 12:15 am

Weiqunw wrote:
Wed Dec 01, 2021 11:42 pm
Does this work for you?

https://new.puchshop.de
It works from our desktop, tested from 2 different networks.
On an Android device, tested from the same 2 different networks, we got the 403 Access Forbidden from 1 line, and the full page from the other line.

I think, at this stage you should get in touch with your webhost on this.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Weiqunw » Thu Dec 02, 2021 12:26 am

That is strange right? The admin/index.php file works from every connection, but the index.php not.

Gonna do some more testing tomorrow.

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands

Post by JNeuhoff » Thu Dec 02, 2021 12:33 am

I can confirm that from our Android device, the new.puchshop.de results in a 403 error, but the new.puchshop.de/admin works fine, tested from one of our lines.
The same works fine from another line for our Android device for both URLs.

Really, at this stage you should have enough entries in your access log showing these 403 errors, and you should contact your webhost to find a solution.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member
Online

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Weiqunw » Tue Dec 07, 2021 5:23 pm

I have found it!

Our isenselabs botblocker was blocking some IP's, even yours.
Strange thing is that on our live shop it didn't block it, no idea why the module added some other IP's, even new visitors as blocked.

Thanks for thinking of me

Active Member

Posts

Joined
Wed Jul 10, 2013 3:29 pm
Location - Arnhem, the Netherlands
Who is online

Users browsing this forum: No registered users and 29 guests