2017-01-05 3 views
0

J'ai utilisé composer pour installer et exécuter avec succès yii2 version 2.0.10 dans mon ordinateur portable en utilisant xampp mais quand je l'ai installé dans Windows Server 2012 r2 avec IIS v 8.5, il montre An internal server error occurred erreur. Je n'ai pas modifié ou édité aucun des fichiers de la nouvelle installation.YII2 Une erreur de serveur interne s'est produite dans IIS 8.5

enter image description here enter image description here

J'ai essayé de renommer le index.php et créé de nouvelles index.php avec écho tout simple et il a bien fonctionné.

EDIT - voici le journal du serveur.

#Software: Microsoft Internet Information Services 8.5 
#Version: 1.0 
#Date: 2017-01-05 23:56:51 
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 
2017-01-05 23:56:51 ::1 GET /advanced/frontend/web/ - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.87+Safari/537.36 http://localhost/advanced/frontend/ 500 0 0 5893 
2017-01-05 23:56:56 ::1 GET /advanced/ - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.87+Safari/537.36 - 200 0 0 21 
2017-01-05 23:56:59 ::1 GET /advanced/frontend/ - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.87+Safari/537.36 http://localhost/advanced/ 200 0 0 3 
2017-01-05 23:57:01 ::1 GET /advanced/frontend/web/ - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.87+Safari/537.36 http://localhost/advanced/frontend/ 500 0 0 103 
2017-01-05 23:59:35 ::1 GET /advanced/frontend/web/ - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.87+Safari/537.36 http://localhost/advanced/frontend/ 500 0 0 61 
2017-01-05 23:59:35 ::1 GET /favicon.ico - 80 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/55.0.2883.87+Safari/537.36 http://localhost/advanced/frontend/web/ 404 0 2 10 

EDIT 2.

essayé d'installer nouveau sous development et il a maintenant une erreur différente.

enter image description here

+0

Vérifiez 'frontend/exécution/logs/app.log' pour les erreurs. – Bizley

+0

Le dossier des journaux est vide. – beginner

+0

Vous devez donc vérifier le journal des erreurs du serveur. – Bizley

Répondre

0

Normalement Yû est .htaccess pour sa configuration mod-rewrite. Le convertissez-vous en un web.config équivalent afin que IIS puisse l'interpréter?

+0

un yii nouvellement installé a-t-il déjà un fichier htaccess? – beginner

0

Vous devez ajouter un web.config fichier dans frontend/web/ et dans le back-end /web/

IIS ne prend pas en charge les fichiers .htaccess

Contenu de web.config

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<directoryBrowse enabled="false" /> 
    <rewrite> 
    <rules> 
     <rule name="Hide Yii Index" stopProcessing="true"> 
     <match url="." ignoreCase="false" /> 
     <conditions> 
     <add input="{REQUEST_FILENAME}" matchType="IsFile" 
       ignoreCase="false" negate="true" /> 
     <add input="{REQUEST_FILENAME}" matchType="IsDirectory" 
       ignoreCase="false" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="index.php" appendQueryString="true" /> 
     </rule> 
    </rules> 
    </rewrite> 
</system.webServer> 
</configuration> 

backend web screenshot

frontend web screenshot