Contao-Camp 2024
Ergebnis 1 bis 7 von 7

Thema: Umzug auf Xampp - lokales Liveupdate und Mod-Rewrite

  1. #1
    Contao-Nutzer
    Registriert seit
    05.11.2009.
    Beiträge
    166

    Standard Umzug auf Xampp - lokales Liveupdate und Mod-Rewrite

    Ich habe eine 2.10.4.-Installation lokal unter Xampp gespeichert und möchte ein paar Dinge testen, bevor ich lokal auf die aktuelle Version umstellen möchte.

    Dabei trat zunächst das Problem auf, dass sich nur die Startseite öffnen ließ. Jede weitere Seite, die im Web problemlos mit mod_rewrite erzeugt wurde, wird lokal nicht angezeigt.
    Ich vermute hier ist irgendwas falsch eingestellt, alledings habe ich diesen Tipp http://www.wie-ging-das.de/webentwic...d-rewrite.html schon befolgt.
    Es geht trotzdem nicht. Statt der Unterseite wird nur eine Xammp-Seite angezeigt.
    Das ist die zugehörige htaccess
    Code:
    ##
    # Contao Open Source CMS
    # Copyright (C) 2005-2011 Leo Feyer
    #
    # Formerly known as TYPOlight Open Source CMS.
    #
    # This program is free software: you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation, either
    # version 3 of the License, or (at your option) any later version.
    # 
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Lesser General Public License for more details.
    # 
    # You should have received a copy of the GNU Lesser General Public
    # License along with this program. If not, please visit the Free
    # Software Foundation website at <http://www.gnu.org/licenses/>.
    #
    # PHP version 5
    # @copyright  Leo Feyer 2005-2011
    # @author     Leo Feyer <http://www.contao.org>
    # @license    LGPL
    ##
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    FileETag None
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      Order allow,deny
      Deny from all
    </FilesMatch>
    
    <IfModule mod_mime.c>
    
      ##
      # Serve the correct content type for .htc files (CSS3 PIE)
      # @see http://css3pie.com/documentation/known-issues/#content-type
      ##
      AddType text/x-component .htc
    
    </IfModule>
    
    <IfModule mod_deflate.c>
    
      ##
      # Use mod_deflate to compress JavaScript, CSS, XML, HTML and PHP files.
      # @see http://developer.yahoo.com/performance/rules.html#gzip
      ##
      <FilesMatch "\.(css|js|xml|html?|php)$">
        SetOutputFilter DEFLATE
      </FilesMatch>
    
    </IfModule>
    
    <IfModule mod_headers.c>
    
      ##
      # Disable ETags
      # @see http://developer.yahoo.com/performance/rules.html#etags
      ##
      Header unset ETag
    
      ##
      # Add a Vary Accept-Encoding header for the compressed resources. If you
      # modify the file types above, make sure to change them here accordingly.
      # @see http://developer.yahoo.com/performance/rules.html#gzip
      ##
      <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    
    </IfModule>
    
    <IfModule mod_expires.c>
    
      ##
      # Activate the module
      ##
      ExpiresActive On
    
      ##
      # Specify an expiration 30 days in the future for images, JavaScripts and
      # CSS files. Edit or remove the lines to set up your own expiration logic.
      # @see http://developer.yahoo.com/performance/rules.html#expires
      ##
      ExpiresByType image/png A2592000
      ExpiresByType image/gif A2592000
      ExpiresByType image/jpg A2592000
      ExpiresByType image/jpeg A2592000
      ExpiresByType text/javascript A2592000
      ExpiresByType application/x-javascript A2592000
      ExpiresByType application/javascript A2592000
      ExpiresByType text/css A2592000
      ExpiresByType image/x-icon A2592000
    
    </IfModule>
    
    <IfModule mod_rewrite.c>
    
      ##
      # Activate the module
      ##
      RewriteEngine On
    
      ##
      # Set the RewriteBase if your Contao installation is in a subdirectoy and
      # the rewrite rules are not working properly. Usage examples:
      #
      #   RewriteBase /contao-2.9.0
      #   RewriteBase /path/to/contao
      #
      # Uncomment the following line to set the RewriteBase.
      ##
      RewriteBase /
    
      ##
      # Contao usually does not pass absolute URLs via GET, therefore the
      # following rules block all requests that try to pass a URL or the /etc/
      # directory as parameter (malicious requests).
      ##
      RewriteCond %{REQUEST_URI} (ftp|https?):|/etc/ [NC,OR]
      RewriteCond %{QUERY_STRING} (ftp|https?):|/etc/ [NC]
      RewriteRule .* - [F,L]
    
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
      #RewriteCond %{HTTP_HOST} ^domain\.com [NC]
      #RewriteRule (.*) http://www.fachschule-gartenbau.de/$1 [R=301,L]
    
      ##
      # If you cannot use mod_deflate, uncomment the following lines to load a
      # compressed .gz version of the bigger Contao JavaScript and CSS files.
      ##
      AddEncoding gzip .gz
      <FilesMatch "\.js\.gz$">
        AddType "text/javascript" .gz
      </FilesMatch>
      <FilesMatch "\.css\.gz$">
        AddType "text/css" .gz
      </FilesMatch>
      RewriteCond %{HTTP:Accept-encoding} gzip
      RewriteCond %{REQUEST_FILENAME} \.(js|css)$
      RewriteCond %{REQUEST_FILENAME}.gz -f
      RewriteRule ^(.*)$ $1.gz [QSA,L]
    
      ##
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents.
      ##
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
    
      ##
      # By default, Contao adds ".html" to the generated URLs to simulate static
      # HTML documents. If you change the URL suffix in the back end settings, make
      # sure to change it here accordingly!
      #
      #   RewriteRule .*\.html$ index.php [L]   # URL suffix .html
      #   RewriteRule .* index.php [L]          # No URL suffix
      #   RewriteRule .*\.txt$ index.php [L]    # URL suffix .txt
      #
      # If you are using mod_cache, it is recommended to use the RewriteRule below,
      # which adds the query string to the internal URL:
      # 
      #   RewriteRule (.*\.html)$ index.php/$1 [L]
      #
      # Note that not all environments support mod_rewrite and mod_cache.
      ##
      RewriteRule .*\.htm$ index.php [L]
    
    </IfModule>
    Sollte ich das lokal zum laufen bringen können, möchte ich gerne lokal ein Liveupdate ausführen und dann die Installation wieder hochladen.
    Ist das ratsam oder Bockmist? Geht das? Hintergrund: Der Hoster unterstützt kein Liveupdate.

  2. #2
    Contao-Fan Avatar von melzebub
    Registriert seit
    21.05.2010.
    Ort
    Lüneburg
    Beiträge
    292
    User beschenken
    Wunschliste

    Standard

    Hast du die Seite lokal unter einer virtuellen Domain laufen? Oder als Unterordner? Dann müsstest du die RewriteBase entsprechend anpassen.

    also. meineContaowebsite.dev oder localhost/meinecontaowebsite?
    Contao Webentwickler / Webdesigner aus Lüneburg - slash-works.de
    kein Support per PN. Fragen gehören ins Forum.

  3. #3
    Contao-Nutzer
    Registriert seit
    05.11.2009.
    Beiträge
    166

    Standard

    die Seite ist standardmäßig unter htdocs abgelegt. Sprich man muss im Browser eingeben localhost/meinewebsite

    Wie muss ich die Rewritebase dann abändern?

  4. #4
    Contao-Fan Avatar von melzebub
    Registriert seit
    21.05.2010.
    Ort
    Lüneburg
    Beiträge
    292
    User beschenken
    Wunschliste

    Standard

    In der htaccess ist auskommentiert


    ##
    # Change the RewriteBase if your Contao installation is in a subdirectoy and
    # the rewrite rules are not working properly. Usage examples:
    #
    # RewriteBase /contao-3.0.0
    # RewriteBase /path/to/contao
    #
    # Depending on your server, you might have to remove the line entirely.
    ##
    # RewriteBase /


    da muss ohne Kommentar

    RewriteBase /meineContaoWebsite
    Contao Webentwickler / Webdesigner aus Lüneburg - slash-works.de
    kein Support per PN. Fragen gehören ins Forum.

  5. #5
    Contao-Nutzer
    Registriert seit
    05.11.2009.
    Beiträge
    166

    Standard mod_rewrite im Frontend geht - Backendunterseiten leider nicht!

    Danke, das war's! Das Frontend geht unter xampp.

    In der Backendstartseite lässt sich der Bereich Extensions nicht mehr aufrufen:
    Code:
    [26-Nov-2013 12:04:03 Europe/Berlin] PHP Fatal error: Uncaught exception 'SoapFault' with message 'SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.contao.org/services/repository.wsdl' : failed to load external entity "http://www.contao.org/services/repository.wsdl"
    ' thrown in H:\xampp\htdocs\fsa\system\modules\rep_client\RepositoryBackendModule.php on line 139
    Kann das daran liegen, dass ich an einem Proxyserver liege, der den Auftruf der Seite unterbindet?
    Geändert von mw1972 (26.11.2013 um 12:07 Uhr)

  6. #6
    Contao-Nutzer
    Registriert seit
    05.11.2009.
    Beiträge
    166

    Standard

    Hab's jetzt mit einer vollkommen jungfräulichen Contao-32-Installation probiert. Da motzt Contao auch wegen SOAP:
    Kann jetzt entweder an Xampp oder am Proxy liegen.

    Code:
    Warning: SoapClient::SoapClient(http://contao.org/services/repository.wsdl): in H:\xampp\htdocs\contao32\system\modules\repository\classes\RepositoryBackendModule.php on line 130
    #0 [internal function]: __error(2, 'SoapClient::Soa...', 'H:\xampp\htdocs...', 130, Array)
    #1 H:\xampp\htdocs\contao32\system\modules\repository\classes\RepositoryBackendModule.php(130): SoapClient->SoapClient('http://contao.o...', Array)
    #2 H:\xampp\htdocs\contao32\system\modules\core\classes\BackendModule.php(100): RepositoryBackendModule->compile()
    #3 H:\xampp\htdocs\contao32\system\modules\repository\classes\RepositoryBackendModule.php(72): Contao\BackendModule->generate()
    #4 H:\xampp\htdocs\contao32\system\modules\repository\classes\RepositoryManager.php(55): RepositoryBackendModule->generate()
    #5 H:\xampp\htdocs\contao32\system\modules\core\classes\Backend.php(266): RepositoryManager->generate()
    #6 H:\xampp\htdocs\contao32\contao\main.php(136): Contao\Backend->getBackendModule('repository_mana...')
    #7 H:\xampp\htdocs\contao32\contao\main.php(287): Main->run()
    #8 {main}

  7. #7
    Wandelndes Contao-Lexikon Avatar von tab
    Registriert seit
    22.10.2013.
    Beiträge
    10.060
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Ich tippe auf den Proxy als ursache. Wenn du oben uner Contao: Google Search mal "ER" und "proxy" eingibst, kommen jedenfalls so einige Ergebnisse.

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •