2016-04-05 12 views
1

İnternet'ten bir projenin kopyası var, ancak onu çalıştıramıyorum. Bu proje Internal Server Error hatasını gösteriyor, bu yüzden bu projeyi çalıştıramıyorum.Dahili Sunucu Hatası

İşte benim .htacces dosyasıdır: Apache yüklemesinde Muhtemelen bir modül kaçırdığınızı

<Files '.ht*'> 
order allow,deny 
deny from all 
</Files> 


#suPHP_ConfigPath http://localhost:81/job/ 

<FilesMatch ".(gif|jpg|jpeg|png|ico|js|css)$"> 
Header set Cache-Control "max-age=2592000" 
</FilesMatch> 

Options +SymLinksIfOwnerMatch 
Options -Multiviews 
RewriteEngine On 
RewriteBase/
php_value output_buffering On 

RewriteRule job-([0-9]+)-(.*)/?$ ./?p=job&id=$1 
RewriteRule job-([0-9]+)/?$ ./?p=job&id=$1 

## EXPIRES CACHING ## 
<IfModule mod_expires.c> 
ExpiresActive On 
ExpiresByType image/jpg "access 1 year" 
ExpiresByType image/jpeg "access 1 year" 
ExpiresByType image/gif "access 1 year" 
ExpiresByType image/png "access 1 year" 
ExpiresByType text/css "access 1 month" 
ExpiresByType text/html "access 1 month" 
ExpiresByType application/pdf "access 1 month" 
ExpiresByType text/x-javascript "access 1 month" 
ExpiresByType application/x-shockwave-flash "access 1 month" 
ExpiresByType image/x-icon "access 1 year" 
ExpiresDefault "access 1 month" 
</IfModule> 
## EXPIRES CACHING ## 

# compress text, HTML, JavaScript, CSS, and XML 
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 

# 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 

cevap

2

(örneğin mod_headers için).

  • mod_headers
  • mod_rewrite
  • mod_expires:

    <Files '.ht*'> 
        order allow,deny 
        deny from all 
    </Files> 
    
    
    #suPHP_ConfigPath http://localhost:81/job/ 
    <IfModule mod_headers.c> 
        <FilesMatch ".(gif|jpg|jpeg|png|ico|js|css)$"> 
         Header set Cache-Control "max-age=2592000" 
        </FilesMatch> 
    </IfModule> 
    
    <IfModule mod_rewrite.c> 
        Options +SymLinksIfOwnerMatch 
        Options -Multiviews 
        RewriteEngine On 
        RewriteBase/
        php_value output_buffering On 
    
        RewriteRule job-([0-9]+)-(.*)/?$ ./?p=job&id=$1 
        RewriteRule job-([0-9]+)/?$ ./?p=job&id=$1 
    </IfModule> 
    
    ## EXPIRES CACHING ## 
    <IfModule mod_expires.c> 
        ExpiresActive On 
        ExpiresByType image/jpg "access 1 year" 
        ExpiresByType image/jpeg "access 1 year" 
        ExpiresByType image/gif "access 1 year" 
        ExpiresByType image/png "access 1 year" 
        ExpiresByType text/css "access 1 month" 
        ExpiresByType text/html "access 1 month" 
        ExpiresByType application/pdf "access 1 month" 
        ExpiresByType text/x-javascript "access 1 month" 
        ExpiresByType application/x-shockwave-flash "access 1 month" 
        ExpiresByType image/x-icon "access 1 year" 
        ExpiresDefault "access 1 month" 
    </IfModule> 
    ## EXPIRES CACHING ## 
    
    # compress text, HTML, JavaScript, CSS, and XML 
    <IfModule mod_filter.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 
    </IfModule> 
    
    # remove browser bugs 
    <IfModule mod_setenvif.c> 
        <IfModule mod_headers.c> 
         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 
        </IfModule> 
    </IfModule> 
    

    Sen Apache kurulum bu modülleri içerdiğini kontrol etmelidir:

    Bu .htaccess bu tür bir hata önlemek için IfModule direktifleri içermelidir

  • mod_filter
  • mod_setenvif