2016-04-05 11 views
1

インターネットからのプロジェクトのコピーがありますが、実行できません。エラーInternal Server Errorが表示されますので、このプロジェクトを実行できません。内部サーバーエラー

はここに私の.htaccesファイルです:Apacheのインストール上のあなたはおそらくモジュールを逃している

<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 

答えて

2

(たとえばmod_headers用)。

  • てmod_headers
  • mod_rewriteの
  • mod_expiresを:あなたは、あなたのApacheのインストールは、これらのモジュールが含まれていることを確認する必要があり

    <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> 
    

    この.htaccessは、この種のエラーを防ぐためにIfModuleディレクティブを含める必要があります

  • mod_filter
  • mod_setenvif