2015-11-26 96 views
0

我的網站在magento下有問題。 將網站遷移到另一臺服務器後,出現500錯誤。Magento遷移錯誤500

我做了什麼:

  • 我從一個服務器複製到另一個文件通過改變APP值> 等> local.xml中使用新的設置。
  • 我導出後,通過使用新的所有 引用我的舊域名引入我的新服務器上的數據庫。
  • 我已完成腳本和magento-check一切正常。

的解決方案開始:

當我運行Magento的-清理腳本和我加載網站,它的工作原理! 但是,當我點擊一個鏈接時,我又有一個500錯誤。 我提出了magento-cleanup腳本,然後加載頁面!

相同的管理界面。

在將站點上載到OVH服務器後,該站點正常工作。在Gandi服務器上,我的.htaccess看起來有些問題,但在OVH中卻沒有。

如果任何人有解決方案來部署在Gandi上的Magento現有安裝,我很感興趣。 也許我會開始一個新的Magento安裝,然後重新註冊我的信息?但無論如何,這似乎更復雜!

感謝您的幫助。

這是我的htaccess:

############################################ 
## uncomment these lines for CGI mode 
## make sure to specify the correct cgi php binary file name 
## it might be /cgi-bin/php-cgi 

#Action php5-cgi /cgi-bin/php5-cgi 
#AddHandler php5-cgi .php 

############################################ 
## GoDaddy specific options 

#Options -MultiViews 

## you might also need to add this line to php.ini 
##  cgi.fix_pathinfo = 1 
## if it still doesn't work, rename php.ini to php5.ini 

############################################ 
## default index file 

DirectoryIndex index.php 

<IfModule mod_php5.c> 

############################################ 
## adjust memory limit 

php_value memory_limit 256M 
php_value max_execution_time 18000 

############################################ 
## disable magic quotes for php request vars 

php_flag magic_quotes_gpc off 

############################################ 
## disable automatic session start 
## before autoload was initialized 

php_flag session.auto_start off 

########################################### 
# disable user agent verification to not break multiple image upload 

php_flag suhosin.session.cryptua off 

########################################### 
# turn off compatibility with PHP4 when dealing with objects 

php_flag zend.ze1_compatibility_mode Off 

</IfModule> 

<IfModule mod_security.c> 
########################################### 
# disable POST processing to not break multiple image upload 

SecFilterEngine Off 
SecFilterScanPOST Off 
</IfModule> 


<IfModule mod_ssl.c> 

############################################ 
## make HTTPS env vars available for CGI mode 

SSLOptions StdEnvVars 

</IfModule> 

<IfModule mod_rewrite.c> 

############################################ 
## enable rewrites 

Options +FollowSymLinks 
RewriteEngine on 

############################################ 
## you can put here your magento root folder 
## path relative to web root 

#RewriteBase /magento/ 

############################################ 
## uncomment next line to enable light API calls processing 

#RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L] 

############################################ 
## rewrite API2 calls to api.php (by now it is REST only) 

#RewriteRule ^api/rest api.php?type=rest [QSA,L] 

############################################ 
## workaround for HTTP authorization 
## in CGI environment 

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 

RewriteRule ^villas(/.+)* /fr/villas$1 [L,R=301] 
RewriteRule ^maisons(/.+)* /fr/maisons$1 [L,R=301] 
RewriteRule ^appartements(/.+)* /fr/appartements$1 [L,R=301] 
RewriteRule ^prestige(/.+)* /fr/prestige$1 [L,R=301] 
RewriteRule ^carte-des-locations-de-vacances(/.+)* /fr/carte-des-locations-de-vacances/$1 [L,R=301] 
RewriteRule ^conciergerie(/.+)* /fr/conciergerie$1 [L,R=301] 
RewriteRule ^offres-speciales(/.+)* /fr/offres-speciales$1 [L,R=301] 
RewriteRule ^polynesie-francaise(/.+)* /fr/polynesie-francaise$1 [L,R=301] 
RewriteRule ^evenements(/.+)* /fr/evenements$1 [L,R=301] 
RewriteRule ^assurance(/.+)* /fr/assurance$1 [L,R=301] 
RewriteRule ^paiement(/.+)* /fr/paiement$1 [L,R=301] 
RewriteRule ^proprietaires(/.+)* /fr/proprietaires$1 [L,R=301] 
RewriteRule ^qui-sommes-nous(/.+)* /fr/qui-sommes-nous$1 [L,R=301] 
RewriteRule ^engagements(/.+)* /fr/engagements$1 [L,R=301] 
RewriteRule ^agents-de-voyages(/.+)* /fr/agents-de-voyages$1 [L,R=301] 
RewriteRule ^mentions-legales-et-credits(/.+)* /fr/mentions-legales-et-credits$1 [L,R=301] 
RewriteRule ^contacts(/.+)* /fr/contacts$1 [L,R=301] 
RewriteRule ^conditions-generales-de-location(/.+)* /fr/conditions-generales-de-location$1 [L,R=301] 

RewriteRule ^houses(/.+)* /en/houses$1 [L,R=301] 
RewriteRule ^condos(/.+)* /en/condos$1 [L,R=301] 
RewriteRule ^special-offers(/.+)* /en/special-offers$1 [L,R=301] 
RewriteRule ^french-polynesia(/.+)* /en/french-polynesia$1 [L,R=301] 
RewriteRule ^concierge-service(/.+)* /en/concierge-service$1 [L,R=301] 
RewriteRule ^insurance(/.+)* /en/insurance$1 [L,R=301] 
RewriteRule ^payment(/.+)* /en/payment$1 [L,R=301] 
RewriteRule ^about-us(/.+)* /en/about-us$1 [L,R=301] 
RewriteRule ^commitments(/.+)* /en/commitments$1 [L,R=301] 
RewriteRule ^travel-agents(/.+)* /en/travel-agents$1 [L,R=301] 
RewriteRule ^legal-mentions-credits(/.+)* /en/legal-mentions-credits$1 [L,R=301] 
RewriteRule ^general-rental-terms(/.+)* /en/general-rental-terms$1 [L,R=301] 
RewriteRule ^payment(/.+)* /en/payment$1 [L,R=301] 

RewriteRule ^en/$ /en/home [L,R=301] 

## page CMS en=>fr 
RewriteRule ^fr/special-offers(/.+)* /fr/offres-speciales [L,R=301] 
RewriteRule ^fr/french-polynesia(/.+)* /fr/polynesie-francaise [L,R=301] 
RewriteRule ^fr/concierge-service(/.+)* /fr/conciergerie [L,R=301] 
RewriteRule ^fr/events(/.+)* /fr/evenements [L,R=301] 
RewriteRule ^fr/insurance(/.+)* /fr/assurance [L,R=301] 
RewriteRule ^fr/payment(/.+)* /fr/paiement [L,R=301] 
RewriteRule ^fr/about-us(/.+)* /fr/qui-sommes-nous [L,R=301] 
RewriteRule ^fr/commitments(/.+)* /fr/engagements [L,R=301] 
RewriteRule ^fr/travel-agents(/.+)* /fr/agents-de-voyages [L,R=301] 
RewriteRule ^fr/rental-map(/.+)* /fr/carte-des-locations-de-vacances [L,R=301] 
RewriteRule ^fr/legal-mentions-credits(/.+)* /fr/mentions-legales-et-credits [L,R=301] 
RewriteRule ^fr/general-rental-terms(/.+)* /fr/conditions-generales-de-location [L,R=301] 

## page CMS fr=>en 
RewriteRule ^en/offres-speciales(/.+)* /en/special-offers [L,R=301] 
RewriteRule ^en/polynesie-francaise(/.+)* /en/french-polynesia [L,R=301] 
RewriteRule ^en/conciergerie(/.+)* /en/concierge-service [L,R=301] 
RewriteRule ^en/evenements(/.+)* /en/events [L,R=301] 
RewriteRule ^en/assurance(/.+)* /en/insurance [L,R=301] 
RewriteRule ^en/paiement(/.+)* /en/payment [L,R=301] 
RewriteRule ^en/qui-sommes-nous(/.+)* /en/about-us [L,R=301] 
RewriteRule ^en/engagements(/.+)* /en/commitments [L,R=301] 
RewriteRule ^en/agents-de-voyages(/.+)* /en/travel-agents [L,R=301] 
RewriteRule ^en/carte-des-locations-de-vacances(/.+)* /en/rental-map [L,R=301] 
RewriteRule ^en/mentions-legales-et-credits(/.+)* /en/legal-mentions-credits [L,R=301] 
RewriteRule ^en/conditions-generales-de-location(/.+)* /en/general-rental-terms [L,R=301] 


############################################ 
## TRACE and TRACK HTTP methods disabled to prevent XSS attacks 

RewriteCond %{REQUEST_METHOD} ^TRAC[EK] 
RewriteRule .* - [L,R=405] 

############################################ 
## redirect for mobile user agents 

#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$ 
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC] 
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302] 

############################################ 
## always send 404 on missing files in these folders 

RewriteCond %{REQUEST_URI} !^/(media|skin|js)/ 

############################################ 
## never rewrite for existing files, directories and links 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-l 

############################################ 
## rewrite everything else to index.php 

RewriteRule .* index.php [L] 

</IfModule> 


############################################ 
## Prevent character encoding issues from server overrides 
## If you still have problems, use the second line instead 

AddDefaultCharset Off 
#AddDefaultCharset UTF-8 

<IfModule mod_expires.c> 

############################################ 
## Add default Expires header 
## http://developer.yahoo.com/performance/rules.html#expires 

ExpiresDefault "access plus 1 year" 

</IfModule> 

############################################ 
## By default allow all access 

Order allow,deny 
Allow from all 

########################################### 
## Deny access to release notes to prevent disclosure of the installed Magento version 

<Files RELEASE_NOTES.txt> 
    order allow,deny 
    deny from all 
</Files> 

############################################ 
## If running in cluster environment, uncomment this 
## http://developer.yahoo.com/performance/rules.html#etags 

#FileETag none 

`

+0

檢查php錯誤日誌,看看錯誤是什麼,並與我們分享 –

+0

你好, 我沒有在錯誤日誌中的錯誤。 ** Apache日誌:** '[:錯誤] [PID 24865:3273234913024 TID](104)通過對等連接復位:[113.197.68.117:60162客戶]的FastCGI:未能從後端server'讀取 * *開機>的console.log:** '開始的Apache2 。服務開始 egrep的:寫入錯誤:中斷的管道 Apache2的狀態退出,代碼爲1,doublechecking ...' 它,問題可能來自似乎從Apache URL重寫(.htaccess或magento配置),但我無法解決我的問題 – Tigrou1664

+0

當我加載該網站時,我也有** fpm日誌**錯誤: '[09-Dec-2015 10:18:46]警告:[pool www] child 24959 ex在0之後的信號11(SIGSEGV)上。929094秒開始' – Tigrou1664

回答

0

500可以通過這麼多的事情引起這麼一些日誌將是非常有益的。 我的第一個猜測是檢查你的文件許可。然後,如果您可以在您的本地環境中複製此錯誤,請編輯您的index.php並啓用此行: ini_set(‘display_errors’, 1); 您不應在此處發佈您的域名。

+0

Hello , 感謝您的幫助 !! 在我的當地環境,當地負載,但是當我點擊一個鏈接我得到一個錯誤404 實例鏈接:'WWW/EN/houses.html' 當我在URL中添加的index.php這樣的: 'www/index.php/en/houses.html',頁面加載正確。 – Tigrou1664

+0

嗯,它似乎是一個不同的問題。我99%確定如果你需要添加index.php,你的.htaccess文件有問題。 你可以確保你已經啓用了mod_rewrite,並且你有允許覆蓋指令正確設置。如果你使用nginx,那麼你必須將它們全部設置在你的conf中 –

+0

我使用Apache,mod_rewrite處於活動狀態,AllowOverride設置爲All。 htaccess在舊服務器上工作,但不是在新的和不在本地(除了添加index.php。 – Tigrou1664