Post by adeelleo » Sat Dec 19, 2020 4:35 am

OpenCart Version: 3.0.3.2
Server OS: Ubuntu Linux 20.04.1
Apache version 2.4.41
PHP versions: 7.0, 7.2, 7.4
Using Certbot with LetsEncrypt for SSL Certificates
SO-THEME used
---------------------------------------------------------------------

I have recently started to consolidated my 3 sites running on Digital Ocean and Linode VPS servers to a VPS running on my own cloud.
I started by creating sub domains of two site with below names and moved these files along with the MySQL Database on the new server.

The two sites that i am currently moving in first go are:
1) https://new.uniquesystems.com.pk (Based on WordPress)
2) https://test.uniquesystems.com.pk (Based on OpenCart)

The WordPress site moved without any issues and is running fine on the new server.
But i ran into lots of errors when configuring the OpenCart Site. (Mostly due to dependency of the theme that i was using on PHP 7.2; New site had PHP 7.4)
I finally managed to make the site functional by using PHP 7.2 just for the OpenCart site.
The site seems to be working fine except that i am unable to access the site through its URL.
Whenever i enter test.uniquesystems.com.pk in any browser it automatically redirects me to new.uniquesystems.com.pk.
Even if i disable new.uniquesystems.com.pk and all other domains except test.uniquesystems.com.pk it takes me to the maintenance page of test.uniquesystems.com.pk whenever i enter the URL in any browser.

However if i click the Home Hyperlink on the maintenance page it takes me to the site and then i can access everything normally.
I have spent a whole week now looking into different configurations but i am unable to pin point where this redirection is taking place.
I have checked the configs.php, admin/config.php, .htaccess, php.ini, a2ensite config files etc but nothing points me to the possible reason for this redirect.
Strange thing is that this behavior is only for the OpenCart Site while the Wordpress site works perfectly fine.

Any help or suggesting would be highly appreciated

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by IP_CAM » Sat Dec 19, 2020 10:55 pm

Better try to find assistance on this paid Theme Extension here:
https://themeforest.net/item/emarket-th ... 1605389263

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by adeelleo » Sun Dec 20, 2020 12:02 am

Thanks IP_CAM.
Do you think this URL redirection can be a theme related issue?
Does not look to be related to the theme.
Looks to be related to either OpenCart, Apache or LetsEncrypt.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by adeelleo » Sun Dec 20, 2020 12:10 am

There are no errors in OpenCart for the theme and everything works flawlessly once i am able to get to the main page of the site after clicking the home button from the maintenance page which appears once i disable all other sites on the server.
The issue is that i don't land to the main page when entering the site URL. Instead i get redirected to another domain.
So that does not look to be related to the theme.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by adeelleo » Sun Dec 20, 2020 12:19 am

Any Idea how i can move this post to the general support section.
This is not theme related.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by JNeuhoff » Sun Dec 20, 2020 12:26 am

You always get a 503 error, and it shows the maintenance page of your test.uniquesystems.com.pk site. It doesn't re-direct to new.uniquesystems.co..pk. Have you cleared your browser cache?

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


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by adeelleo » Sun Dec 20, 2020 12:49 am

JNeuhoff wrote:
Sun Dec 20, 2020 12:26 am
You always get a 503 error, and it shows the maintenance page of your test.uniquesystems.com.pk site. It doesn't re-direct to new.uniquesystems.co..pk. Have you cleared your browser cache?
Thanks for taking out the time to reply.
I don't think this is a browser cache issue since i do all testing in Incognito mode.
I disabled all other sites on the server and uploaded screenshot images to help better explain the situation.
Once I enter http://test.uniquesystems.com.pk in Browser at the bottom of the browser window you can see that its trying to connect http://new.uniquesystems.com.pk instead of http://test.uniquesystems.com.pk.
Once i land on the maintenance page and click site logo or home page hyperlink i get to the actual landing page of the site and everything seems to work from there on.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by IP_CAM » Sun Dec 20, 2020 1:19 am

Any Idea how i can move this post to the general support section. This is not theme related.
Well, if one uses a commercial Theme, it's no longer a free 'general support' matter, accept it or not.
But I placed it one section higher, if that better meets your expectations ... :D
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by JNeuhoff » Sun Dec 20, 2020 1:26 am

I am unable to reproduce your error. But you need to sort out your 503 error. And get a proper web theme!

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


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by adeelleo » Sun Dec 20, 2020 1:31 am

IP_CAM wrote:
Sun Dec 20, 2020 1:19 am
Any Idea how i can move this post to the general support section. This is not theme related.
Well, if one uses a commercial Theme, it's no longer a free 'general support' matter, accept it or not.
But I placed it one section higher, if that better meets your expectations ... :D
Ernie
Thanks IP_CAM :-)
I don't mind going to the team developer if you guys think this is theme related.
The same theme working fine on the actual site on the DigitalOcean VPS. http://shop.uniquesystems.com.pk
I did not make any changes to the site. Just copied it over to the new servers.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by IP_CAM » Sun Dec 20, 2020 1:46 am

Well, it just must be understud, you're not just using a 'simple' Theme Extension,
your Theme Extension is adding Custom Code in a variety of places, thereby changing
some default OC ways of doing things. So, better contact those, creating that Extension,
to eventually get some help. Good Luck!
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by adeelleo » Sun Dec 20, 2020 1:54 am

IP_CAM wrote:
Sun Dec 20, 2020 1:46 am
Well, it just must be understud, you're not just using a 'simple' Theme Extension,
your Theme Extension is adding Custom Code in a variety of places, thereby changing
some default OC ways of doing things. So, better contact those, creating that Extension,
to eventually get some help. Good Luck!
Ernie
Thanks Ernie,
I now believe that you are correct in suggesting the theme.
After your suggestion i tried a couple of things.
I went into the admin>modification section and cleared and refreshed the modification. (Although i had already done this several times before after moving to new server)
Then i went to the dashboard and cleared the Theme and SASS Cache. (Again this was done several times before after moving to the new server)
After these two steps i am able to access the site without any issues for 5-6 times before it goes back to the old behavior.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm

Post by ADD Creative » Sun Dec 20, 2020 4:26 am

adeelleo wrote:
Sun Dec 20, 2020 12:49 am
Thanks for taking out the time to reply.
I don't think this is a browser cache issue since i do all testing in Incognito mode.
I disabled all other sites on the server and uploaded screenshot images to help better explain the situation.
Once I enter http://test.uniquesystems.com.pk in Browser at the bottom of the browser window you can see that its trying to connect http://new.uniquesystems.com.pk instead of http://test.uniquesystems.com.pk.
Once i land on the maintenance page and click site logo or home page hyperlink i get to the actual landing page of the site and everything seems to work from there on.
I can't recreated your issue. If I enter test in stays on test. Unless you have fixed it already the caching of the redirect is likely being done your side of things. Use your web browser's developer tool (usually F12) network tab to see what happening.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by adeelleo » Wed Dec 23, 2020 5:16 pm

Ok So i finally managed to resolve the issue.

Documenting below what i did so that in case anyone else faces the same issue they can save time:

1) I had to configure PHP 7.2 just for this site since not only the theme but certain modules of OpenCart seemed to be dependent on PHP 7.2. All other sites would be using PHP 7.4 on the same VPS server.
I achieved this by adding the below lines in the site config file located at /etc/apache2/sites-available

<FilesMatch \.php$>
# For Apache version 2.4.10 and above, use SetHandler to run PHP as a fastCGI process server
SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost"
</FilesMatch>

2) I disabled all other domains and subdomains on the server.
3) Then I enabled only the domain which was having the issue
4) Re-installed the SSL Certificate for this subdomain using the below command:
- sudo certbot -i apache -a manual --preferred-challenges dns -d yoursite.com -d www.yoursite.com
(Replace yoursite with your site domain name)
5) For some odd reason i kept getting redirected to the maintenance page. To resolve that i went to the admin>system>settings>server section and disabled Maintenance mode.

After this i had a fully functional site again. :-)

Thanks for all the guys who pitched in and tried to help.

Newbie

Posts

Joined
Mon Sep 15, 2014 2:28 pm
Who is online

Users browsing this forum: No registered users and 13 guests