Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: lokale Installation mit SSL

    arslibri

    • Frisch an Board
    • Beiträge: 70
    lokale Installation mit SSL
    am: 16. März 2021, 17:02:28
    Ich versuche den Live-Shop, der natürlich auf mit SSL verschlüsselt ist, lokal zu installieren, und das auch mit einem selbstgezeichneten Zertifikat, damit ich exakt die gleiche Installation lokal habe und so alle Änderungen, Updates etc. lokal vornehmen und testen kann bevor ich irgendetwas live ändere.

    Folgendes Tutorial hab ich übrigens mal verwendet um die Zertifikate zu erstellen: https://www.youtube.com/watch?v=886Pea2ljm0

    Und dann versucht den Shop über https://localhost:8888/path/to/shop/ zu erreichen
    Das geht aber nicht.

    in configure.php hab ich

    Code: PHP  [Auswählen]
      // secure SSL
      defined('ENABLE_SSL') or define('ENABLE_SSL', false); // secure webserver for checkout procedure?
     

    und

    Code: PHP  [Auswählen]
      defined('HTTPS_SERVER') or define('HTTPS_SERVER', 'https://localhost:8888');
     

    eingetragen

    und weiter unten ist meine .htaccess

    Und ich hab noch eine Frage, hängt vielleicht hiermit zusammen.
    In den Breadcrumbs, auf der Startseite steht: Startseite > Katalog
    Katalog ist quasi die Startseite
    Wenn ich auf Startseite klicke komme ich ich in den Ordner über dem root Folder des Shops, also der Ordner meiner MAMP-installation.
    Das ist anders die Live-Version wo das vielleicht mal angepasst wurde. Die lokale Installation ist quasi out of the box, nämlich praktisch unverändert v2.0.5.1 rev 12725
    Aber das ist dennoch irgendwie seltsam.
    Muss wohl mit einem der folgenden zu tun haben:
    HTTP_SERVER, HTTPS_SERVER, DIR_WS_CATALOG (configure.php), RewriteBase (htaccess)
    Nur weiß ich nicht welches

    Andere Threads zum gleichen Thema hier im Forum sind irgendwie schon älter und bin mir nicht sicher ob mit dieser Shop-Version noch relevant.

    Danke für Eure Hilfe

    Code: PHP  [Auswählen]
    ##-- $Id: _.htaccess 12137 2019-09-20 21:31:16Z Tomcraft $

    ##-- Default charset
    #AddDefaultCharset UTF-8
    AddDefaultCharset ISO-8859-15

    ##-- Disable the server signature
    ServerSignature Off

    ##-- Turn off ETags in HTTP-header (use both directives)
    <IfModule mod_headers.c>
      Header unset ETag
      RequestHeader unset Proxy
    </IfModule>
    FileETag None

    ##-- When caching of gzipped JS and CSS files is used, enable this setting
    <IfModule mod_headers.c>
      Header set Vary Accept-Encoding
    </IfModule>

    ##-- when using Provider 1&1 set the following lines to activate PHP5
    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

    ##-- Add Mime Types
    <IfModule mod_mime.c>
      AddType application/font-woff2 .woff2
    </IfModule>

    # Disable directory browsing (disabled by default as this causes problems on some servers because they don't allow AllowOverride Directive for Options)
    #Options -Indexes

    ##-- Enable the compression for any type of content
    <IfModule mod_deflate.c>
      <FilesMatch "(\.js|\.css|\.html|\.htm|\.php|\.xml|\.ico|\.jpg|\.jpeg|\.png|\.gif|\.svg|\.woff|\.woff2|\.ttf|\.otf|\.eot|\.JS|\.CSS|\.HTML|\.HTM|\.PHP|\.XML|\.ICO|\.JPG|\.JPEG|\.PNG|\.GIF|\.SVG|\.WOFF|\.WOFF2|\.TTF|\.OTF|\.EOT)$">
        SetOutputFilter DEFLATE
      </FilesMatch>
    </IfModule>

    ##-- Customization of HTTP request and response headers
    <IfModule mod_headers.c>
      <FilesMatch "(\.ico|\.jpg|\.jpeg|\.png|\.gif|\.swf|\.flv|\.svg|\.ICO|\.JPG|\.JPEG|\.PNG|\.GIF|\.SWF|\.FLV|\.SVG)$">
        Header set Cache-Control "max-age=2592000, public, must-revalidate"
      </FilesMatch>
      <FilesMatch "(\.woff|\.woff2|\.ttf|\.otf|\.eot|\.WOFF|\.WOFF2|\.TTF|\.OTF|\.EOT)$">
        Header set Cache-Control "max-age=2592000, public, must-revalidate"
      </FilesMatch>
      <FilesMatch "(\.css|\.js|\.CSS|\.JS)$">
        Header set Cache-Control "max-age=604800, private, must-revalidate"
      </FilesMatch>
      <FilesMatch "(\.xml|\.txt|\.XML|\.TXT)$">
        Header set Cache-Control "max-age=604800, public, must-revalidate"
      </FilesMatch>
      <FilesMatch "(\.html|\.htm|\.php|\.HTML|\.HTM|\.PHP)$">
        Header set Cache-Control "max-age=1, private, must-revalidate"
      </FilesMatch>
    </IfModule>

    ##-- Generation of Expires and Cache-Control HTTP headers
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 1 seconds"
      ExpiresByType image/gif "access plus 2592000 seconds"
      ExpiresByType image/jpg "access plus 2592000 seconds"
      ExpiresByType image/jpeg "access plus 2592000 seconds"
      ExpiresByType image/png "access plus 2592000 seconds"
      ExpiresByType image/svg+xml "access plus 2592000 seconds"
      ExpiresByType text/html "access plus 1 seconds"
      ExpiresByType text/css "access plus 604800 seconds"
      ExpiresByType text/javascript "access plus 604800 seconds"
      ExpiresByType application/x-javascript "access plus 604800 seconds"
      ExpiresByType application/javascript "access plus 604800 seconds"
      ExpiresByType text/x-component "access plus 604800 seconds"
      ExpiresByType font/truetype "access plus 604800 seconds"
      ExpiresByType font/opentype "access plus 604800 seconds"
      ExpiresByType application/x-font-ttf "access plus 604800 seconds"
      ExpiresByType application/x-font-woff "access plus 604800 seconds"
      ExpiresByType application/font-woff "access plus 604800 seconds"
      ExpiresByType application/vnd.ms-fontobject "access plus 604800 seconds"
      ExpiresByType image/x-icon "access plus 604800 seconds"

      <IfModule mod_headers.c>
        Header append Cache-Control "public"
      </IfModule>
    </IfModule>

    ##-- Configure php_flags if necessary
    ##-- BEGIN - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
    #<IfModule mod_php.c>

      ##-- Warn when arguments are passed by reference at function call time (from PHP5 allow_call_time_pass_reference is deprecated)
      #php_flag allow_call_time_pass_reference on

      ##-- Disable transparent sid support PHP-default is off (XTC Session only on first visit)
      #php_flag session.use_trans_sid off

      ##-- set suhosin flags because of errors with attributes (for webhosters with suhosin hardening patch enabled)
      #php_value suhosin.post.max_array_depth 0
      #php_value suhosin.post.max_array_index_length 0
      #php_value suhosin.post.max_vars 0
      #php_value suhosin.request.max_array_depth 0
      #php_value suhosin.request.max_array_index_length 0
      #php_value suhosin.request.max_vars 0

      ##-- set suhosin flags to have unencrypted session data, affecting "whos_online" & "shopping cart" (for webhosters with suhosin hardening patch enabled)patch enabled
      #php_value suhosin.session.encrypt Off
      #php_value suhosin.session.cryptkey ''

    ##-- END - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
    #</IfModule>

    ##-- Redirect error pages to Sitemap
    ##-- set the correct Path to ErrorDocument
    ErrorDocument 400 /sitemap.html?error=400
    ErrorDocument 401 /sitemap.html?error=401
    ErrorDocument 402 /sitemap.html?error=402
    ErrorDocument 403 /sitemap.html?error=403
    ErrorDocument 404 /sitemap.html?error=404
    ErrorDocument 500 /sitemap.html?error=500

    ##-----------------------------------------
    ##- SEO Shopstat Modul (Hartmut Koenig)
    ##-----------------------------------------
    <IfModule mod_rewrite.c>
      ##-- Initialize and enable rewrite engine
      ##-- Documentation http://httpd.apache.org/docs/misc/rewriteguide.html
      RewriteEngine On

      ##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
      ##-- set the following line like e.g.: RewriteBase /shop/
      RewriteBase /arslibri.lu/

      ##-- disallow access to dotfiles (.htaccess, .svn, .git, etc.)
      #RedirectMatch 403 /\.
     
      ##-- Use canonical URLs
      ##-- Use SSL-Proxy
      ##-- HostEurope
      #RewriteCond %{HTTP:X-Forwarded-Server} !^ssl\.webpack\.de$ [NC]
      ##-- 1und1
      #RewriteCond %{HTTP:X-Forwarded-Server} !^ssl\.kundenserver\.de$ [NC]
      ##-- domainFACTORY
      #RewriteCond %{HTTP:X-Forwarded-Server} !^sslsites\.de$ [NC]
      ##-- All-Inkl
      #RewriteCond %{HTTP:X-Forwarded-Server} !^ssl-account\.com$ [NC]
      ##-- Strato
      #RewriteCond %{HTTP:X-Forwarded-Server} !^www\.ssl-id\.de$ [NC]
     
      ##-- redirect to http www-domain, when www is missing and no subdomain given and not using an ssl-proxy
      #RewriteCond %{HTTP_HOST} !^www\. [NC]
      #RewriteCond %{HTTP_HOST} !\.(.*)\. [NC]
      #RewriteCond %{HTTP_HOST} !^localhost [NC]
      #RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

      ##-- redirect to https www-domain, when www is missing and no subdomain given and not using an ssl-proxy
      #RewriteCond %{HTTP_HOST} !^www\. [NC]
      #RewriteCond %{HTTP_HOST} !\.(.*)\. [NC]
      #RewriteCond %{HTTP_HOST} !^localhost [NC]
      #RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      #RewriteCond %{SERVER_PORT} !^443$
      #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

      ##-- redirect to https non-www-domain, when no subdomain given and not using an ssl-proxy
      #RewriteCond %{SERVER_PORT} !^443$ [OR]
      #RewriteCond %{HTTP_HOST} ^www\. [NC]
      #RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
      #RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]

      ##-- Sitemap
      RewriteRule ^sitemap(.*)\.html$ shop_content.php?coID=8 [QSA,L]

      ##----------------------------------------------------------------------------------
      ##-- When working with SEO-Urls you can decide, whether to use a colon ":" or a dash "-" symbol
      ##-- (Windows Servers might have problems with colon as delimiter!)
      ##-- Change the delimiter symbol (SEO_SEPARATOR) also in file "/includes/extra/seo_url_mod/seo_url_shopstat.php"
      ##-- or create a new file "/includes/extra/configure/seo_separator.php"
      ##-- with the following content: <?php define('SEO_SEPARATOR','-'); ?>
      ##----------------------------------------------------------------------------------

      ##-- Use colon delimiter ":" for SEO-URLS (default setting)
      ##-- Categories (:::)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*):::([_0-9]+):([_0-9]+)\.html$ index.php?cPath=$4&page=$5&language=$2 [QSA,L]
      RewriteRule ^([\/]?)([a-z]{2})\/(.*):::([_0-9]+)\.html$ index.php?cPath=$4&language=$2 [QSA,L]
      RewriteRule :::([_0-9]+):([_0-9]+)\.html$ index.php?cPath=$1&page=$2 [QSA,L]
      RewriteRule :::([_0-9]+)\.html$ index.php?cPath=$1 [QSA,L]

      ##-- Products (::)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)::(.+)\.html$ product_info.php?products_id=$4&language=$2 [QSA,L]
      RewriteRule ::(.+)\.html$ product_info.php?products_id=$1 [QSA,L]

      ##-- Content (:_:)
      RewriteRule ([\/]?)([a-z]{2})\/(.*):_:([0-9]+)\.html$ shop_content.php?coID=$4&language=$2 [QSA,L]
      RewriteRule :_:([0-9]+)\.html$ shop_content.php?coID=$1 [QSA,L]

      ##-- Manufacturers (:.:)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*):\.:([_0-9]+):([_0-9]+)\.html$ index.php?manufacturers_id=$4&page=$5&language=$2 [QSA,L]
      RewriteRule ^([\/]?)([a-z]{2})\/(.*):\.:([0-9]+)\.html$ index.php?manufacturers_id=$4&language=$2 [QSA,L]
      RewriteRule :\.:([_0-9]+):([_0-9]+)\.html$ index.php?manufacturers_id=$1&page=$2 [QSA,L]
      RewriteRule :\.:([0-9]+)\.html$ index.php?manufacturers_id=$1 [QSA,L]

      ##-- Use dash delimiter "-" for SEO-URLS (alternative setting i.e. for windows servers)
      ##-- Categories (---)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)---([_0-9]+)-([_0-9]+)\.html$ index.php?cPath=$4&page=$5&language=$2 [QSA,L]
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)---([_0-9]+)\.html$ index.php?cPath=$4&language=$2 [QSA,L]
      RewriteRule ---([_0-9]+)-([_0-9]+)\.html$ index.php?cPath=$1&page=$2 [QSA,L]
      RewriteRule ---([_0-9]+)\.html$ index.php?cPath=$1 [QSA,L]

      ##-- Products (--)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)--(.+)\.html$ product_info.php?products_id=$4&language=$2 [QSA,L]
      RewriteRule --(.+)\.html$ product_info.php?products_id=$1 [QSA,L]

      ##-- Content (-_-)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)-_-([0-9]+)\.html$ shop_content.php?coID=$4&language=$2 [QSA,L]
      RewriteRule -_-([0-9]+)\.html$ shop_content.php?coID=$1 [QSA,L]

      ##-- Manufacturers (-.-)
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)-\.-([_0-9]+)-([_0-9]+)\.html$ index.php?manufacturers_id=$4&page=$5&language=$2 [QSA,L]
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)-\.-([0-9]+)\.html$ index.php?manufacturers_id=$4&language=$2 [QSA,L]
      RewriteRule -\.-([_0-9]+)-([_0-9]+)\.html$ index.php?manufacturers_id=$1&page=$2 [QSA,L]
      RewriteRule -\.-([0-9]+)\.html$ index.php?manufacturers_id=$1 [QSA,L]

      ##-- language
      RewriteCond %{SCRIPT_FILENAME} !-d
      RewriteRule ^([\/]?)([a-z]{2})\/(.*)([^.]*)$ $3?language=$2 [QSA,L]
    </IfModule>


    Linkback: https://www.modified-shop.org/forum/index.php?topic=41748.0
    1 Antworten
    1431 Aufrufe
    30. Januar 2018, 08:22:45 von fishnet
    10 Antworten
    4900 Aufrufe
    18. Januar 2014, 19:50:16 von Frank_H
    2 Antworten
    1089 Aufrufe
    02. Februar 2021, 09:45:18 von kira12
    14 Antworten
    3845 Aufrufe
    22. März 2016, 09:41:54 von satriani