Support » Localhost Installs » move live site to localhost wamp server given the internal server error

  • Hello

    i want to rebuild my website and thats why i want to test it on my local server. i am using WAMP on windows 7. I have followed this link to move a live site to local host. But i am getting internal server error.

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at wampserver@otomatic.net to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    Apache/2.4.18 (Win32) PHP/5.6.19 Server at localhost Port 80

    Please help me i am a beginner.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Suggest that you follow up on the hint that you find the additional details in the “error.log” file of your apache server.

    Your WAMP docs and support community should be able to assist you.

    hi RossMitchell

    i found this error in my apache server
    .htaccess: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

    please help

    i checked my apache error log and find out this error

    [core:alert] [pid 5220:tid 916] [client ::1:64537] C:/Users/alex/wamp/www/mysite/.htaccess: Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

    here is my .htaccess file

    Header unset Pragma
    FileETag None
    Header unset ETag
    
    ## EXPIRES CACHING ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 7 days"
    ExpiresByType image/jpeg "access plus 7 days"
    ExpiresByType image/gif "access plus 7 days"
    ExpiresByType image/png "access plus 7 days"
    ExpiresByType text/css "access plus 7 days"
    ExpiresByType application/pdf "access plus 7 days"
    ExpiresByType text/x-javascript "access plus 7 days"
    ExpiresByType application/x-shockwave-flash "access plus 7 days"
    ExpiresByType image/x-icon "access plus 7 days"
    ExpiresDefault "access plus 1 seconds"
    </IfModule>
    ## EXPIRES CACHING ##
    
    <IfModule mod_headers.c>
      <FilesMatch ".(js|css|xml|gz|html)$">
        Header append Vary: Accept-Encoding
      </FilesMatch>
    </IfModule>
    
    <FilesMatch "\\.(js|css|html|htm|php|xml)$">
    SetOutputFilter DEFLATE
    </FilesMatch>
    
    # BEGIN gzip file compression
    # Compress HTML, CSS, JavaScript, Text, XML and fonts
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
    AddOutputFilterByType DEFLATE application/x-font
    AddOutputFilterByType DEFLATE application/x-font-opentype
    AddOutputFilterByType DEFLATE application/x-font-otf
    AddOutputFilterByType DEFLATE application/x-font-truetype
    AddOutputFilterByType DEFLATE application/x-font-ttf
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE font/opentype
    AddOutputFilterByType DEFLATE font/otf
    AddOutputFilterByType DEFLATE font/ttf
    AddOutputFilterByType DEFLATE image/svg+xml
    AddOutputFilterByType DEFLATE image/x-icon
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/javascript
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/xml
    # Remove browser bugs
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    Header append Vary User-Agent
    # END gzip file compression
    
    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
        <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
            AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    # BEGIN WP Performance Score Booster Settings
    
    ## BEGIN Enable GZIP Compression ##
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE image/svg+xml
    SetOutputFilter DEFLATE
    </IfModule>
    ## END Enable GZIP Compression ##
    
    ## BEGIN Vary: Accept-Encoding Header ##
    <IfModule mod_headers.c>
    <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
    </FilesMatch>
    </IfModule>
    ## END Vary: Accept-Encoding Header ##
    
    ## BEGIN Expires Caching (Leverage Browser Caching) ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 2 week"
    ExpiresByType image/jpeg "access 2 week"
    ExpiresByType image/gif "access 2 week"
    ExpiresByType image/png "access 2 week"
    ExpiresByType text/css "access 2 week"
    ExpiresByType application/pdf "access 2 week"
    ExpiresByType text/x-javascript "access 2 week"
    ExpiresByType application/x-shockwave-flash "access 2 week"
    ExpiresByType image/x-icon "access 2 week"
    ExpiresDefault "access 2 week"
    </IfModule>
    ## END Expires Caching (Leverage Browser Caching) ##
    
    # END WP Performance Score Booster Settings

    i have tried the solution of removing .htacess file and replacing it with the default .htacess file for wordpress

    also i have checked by removing the .htacess file
    it gives following error
    Parse error: syntax error, unexpected end of file in C:\Users\alex\wamp\www\mysiite\wp-includes\wp-db.php on line 827

    A literal reading of the error message suggests that the problem starts with the very first word of the file, it is “Header”, you need to find out just what modules your server loads and activates.

    As a mere tinkerer in .htaccess files, what I would do is start with an empty .htaccess file and gradually add elements till it complains.

    More docs on .htaccess here:
    http://httpd.apache.org/docs/2.4/howto/htaccess.html

    Most people don’t realize that Windows versions of Apache have different modules loaded by default than Linux versions of Apache. I strongly suggest that you insure you have the same Apache modules loaded on your localhost system that you do on the server which contains the original .htaccess file.

    My guess is that mod_headers isn’t being loaded in your localhost Apache installation.

    And for what it’s worth, roughly half of your .htaccess file is archaic/outdated stuff that doesn’t work correctly with Apache 2.4!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘move live site to localhost wamp server given the internal server error’ is closed to new replies.