Local copy of my existing OPENCART website with SSL

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Local copy of my existing OPENCART website with SSL

Postby saninn1 » 05. June 2018 13:57

Hello
I almost give up this xampp nightmare but here i will try last chance...
I searched 21032100 internet forums and etc but noone can actually explain or give any kind of understandable info.
I start to feel like i am doing something illegal.... why is it so hard ?
I have a https webstore and i simple want to download and use it ( as i have done in the past) but the problem now is that i have SSL certificate on my website since 7-8 months... so when i set up my xamp and localhost i reach the point where i can enter my localhost/website and then i see perfect home page with pictures and everything but every time i click on a link i get only pure html with no images in there no css...
when i remove the FUCKING "S" from httpS it is fixing itself but thats until i click another link in the website...
I know that noone here can help me tho...and plz dont point me out to some "how to run ssl on localhost " bullshit becouse that doesnt help at all
lets face it - this is just broken bugg thing that developers cannot overcome but noone admit that SSL shit actually destroyed XAMP and localhost testing :?
saninn1
 
Posts: 3
Joined: 05. June 2018 13:51
XAMPP version: 5
Operating System: windows

Re: Local copy of my existing OPENCART website with SSL

Postby TonyVier » 05. June 2018 23:34

The best thing is to replicate the "real" hosting situation as much as you can on your local XAMPP machine. That means, using virtual hosts, and if needed ssl.

And you can come very close in this replication.

As long as you don't try that, things will not work "at home" as they do on the net. If you think this is bs, find something else to do. Like knitting.
TonyVier
 
Posts: 43
Joined: 24. May 2018 11:22
XAMPP version: 7.2.5-0
Operating System: Windows 10 pro

Re: Local copy of my existing OPENCART website with SSL

Postby Nobbie » 06. June 2018 11:19

saninn1 wrote:I almost give up this xampp nightmare but here i will try last chance...


With "fuck" and "bullshit" and everything else? Do you really believe someone is going to help you for that??

saninn1 wrote:I start to feel like i am doing something illegal.... why is it so hard ?


Its not illegal, but requires some knowlegde, obviously you dont have the knowledge.

According to your poor description you are trying to run a script locally (but your description lacks as good as all information we need), and due to some changes some month ago, you are running it via https and/or via http, something of mixing these in your software and i can tell you, that is quite the source of all your problems. If (for example) you are starting a request via https, but the requested document contains some links to CSS modules via http, these modules arent loaded from the browser due to security reasons - exactly what seems to happen to you, therefor all attributes and formats are missing. If you switch over to http, everything is fine (because then all the CSS modules are loaded), but clicking on any link again leads to https (because obviously something in your opencart is configured that way) and the problems arise again.

Usually easily to fix, remember what you did when you switched from http to https a few month ago and simply undo these changes for your local installation, that should result in your local shop running plainly via http.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Local copy of my existing OPENCART website with SSL

Postby saninn1 » 08. June 2018 15:34

It is not that simple.
Well if you want to know hwat i have done okay here it is step by step
I download the DB and run it on localhost phpmyadmin
i download the entire website folder from my hosting and paste it into c:\xampp\htdocs\blablabla
i then fix my htacess my config my php.ini files to work with the localhost. This is something i have done before and it was working fine.
Next thing i start the xampp and go to localhost/mywebsite
It loads okay everything seems perfect
I click a link
and then the trollollo mode of xampp activates the new page is now loaded as entirely html with 0 style everything is mish-mashed around no pictures nothing
I remove the S from httpS = http
it fixes
everything is now fine
click new link
trollollo mode again
etc...
Nothing seems to fix that
i have done around 30 "solutions" from all kind of websites
Nothing fixing the problem
I am sad :(
FML
//Inserting EMO emoji and go cry in corner//
saninn1
 
Posts: 3
Joined: 05. June 2018 13:51
XAMPP version: 5
Operating System: windows

Re: Local copy of my existing OPENCART website with SSL

Postby TonyVier » 08. June 2018 15:58

So, you make a trollollo virtual host, add ssl to the trollolo virtual host, and trollolo it works, and you can get out of your corner.
TonyVier
 
Posts: 43
Joined: 24. May 2018 11:22
XAMPP version: 7.2.5-0
Operating System: Windows 10 pro

Re: Local copy of my existing OPENCART website with SSL

Postby Nobbie » 08. June 2018 19:01

saninn1 wrote:and then the trollollo mode of xampp activates the new page is now loaded as entirely html with 0 style everything is mish-mashed around no pictures nothing


Exactly what i figured out above. You are NOW calling your site via https, but for unknown reason (your description is not sufficient to find out why), your CSS style sheets are linked via http (instead of https). Therefore the browser does not load the style sheet (for safety reasons), finally your site is looking ugly.

"Trollolo" is not a Xampp mode, it is due to your missing knowledge. It also has nothing to do with Xampp, the problems happen due to your poor knowledge. You obviously have no idea how to port your applcation CORRECTLY from the internet to your local PC. Thats all. Last not least, i simply could do that for you, but i am pretty unsure, why should i do that? You're so cheeky and rude, why would anyone help you?
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Local copy of my existing OPENCART website with SSL

Postby saninn1 » 18. June 2018 12:33

Hey i am not rude or cheeky... i simply was getting nervous because i wasted more then 4 hours into this...
Please tell me how to do this i will provide information
i have no idea how to set up virtualhost and add ssl on it...
my website uses opencart 2.2 and journal for it if thats anything to do with the issue :?
saninn1
 
Posts: 3
Joined: 05. June 2018 13:51
XAMPP version: 5
Operating System: windows

Re: Local copy of my existing OPENCART website with SSL

Postby TonyVier » 18. June 2018 14:32

In your:

xampp\apache\conf\extra

you see httpd-vhosts.conf and httpd-ssl.conf

in vhosts:

Code: Select all
<VirtualHost *:80>
    ServerAdmin webmaster@www.example.com
    DocumentRoot "G:\xampp\htdocs\www.example.com"
    ServerName example.com
    ServerAlias www.example.com
    ErrorLog "logs/www.example.com-error.log"
    CustomLog "logs/www.example.com-access.log" common
</VirtualHost>


and in ssl

Code: Select all
<VirtualHost *:443>
    ServerAdmin webmaster@www.example.com
    DocumentRoot "D:\WebServer\Apache\htdocs\www.example.com"
    ServerName example.com
    ServerAlias www.example.com
   SSLEngine on
    SSLCertificateFile "G:\xampp\apache\conf\ssl.crt\example.com.crt"
    SSLCertificateKeyFile "G:\xampp\apache\conf\ssl.key\example.com.key"
    <FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
    </FilesMatch>
   ErrorLog "logs/www.example.com-error.log"
    CustomLog "logs/www.example.com-access.log" common
</VirtualHost>


Add example.com to your hosts file:

Code: Select all
C:\Windows\System32\drivers\etc\hosts


Code: Select all
127.0.0.1 www.example.com
127.0.0.1 example.com
TonyVier
 
Posts: 43
Joined: 24. May 2018 11:22
XAMPP version: 7.2.5-0
Operating System: Windows 10 pro


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 93 guests