Has anyone had success with using Craft and WTServer (WinNMP) together? I'm getting a 400 error at "http://craft.test/index.php?p=admintrigger/actions/users/login" after trying to login the admin. I'm suspicious that my Nginx config rewrites aren't working, but unsure how to troubleshoot it. The front-end displays fine, and the login screen works but the login submit throws the 400 error.
nginx server block...
server {
listen 127.0.0.1:80;
server_name craft.test craft.dev;
charset utf-8;
root "c:/wtserver/www/craft/web"; # locked
allow 127.0.0.1;
deny all;
index index.html index.htm index.php;
ssi on;
client_max_body_size 0;
error_page 404 /index.php?$query_string;
location / {
try_files $uri/index.html $uri $uri/ /index.php?$query_string;
}
location ~ [^/]\.php(/|$) {
try_files $uri $uri/ /index.php?$query_string;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Change this to whatever version of php you are using
include nginx.fastcgi.conf;
include nginx.redis.conf;
fastcgi_pass php_farm;
fastcgi_hide_header X-Powered-By;
add_header Last-Modified $date_gmt;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
if_modified_since off;
expires off;
etag off;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ~ /\.(ht|svn|git) {
deny all;
}
sendfile off;
general.php
return [
// Global settings
'*' => [
// Default Week Start Day (0 = Sunday, 1 = Monday...)
'defaultWeekStartDay' => 1,
// Whether generated URLs should omit "index.php"
'omitScriptNameInUrls' => true,
// Control Panel trigger word
'cpTrigger' => 'admintrigger',
// The secure key Craft will use for hashing and encrypting data
'securityKey' => getenv('SECURITY_KEY'),
// Whether to save the project config out to config/project.yaml
// (see https://docs.craftcms.com/v3/project-config.html)
'useProjectConfigFile' => false,
],
// Dev environment settings
'dev' => [
// Dev Mode (see https://craftcms.com/guides/what-dev-mode-does)
'devMode' => true,
],
// Staging environment settings
'staging' => [
// Set this to `false` to prevent administrative changes from being made on staging
'allowAdminChanges' => true,
],
// Production environment settings
'production' => [
// Set this to `false` to prevent administrative changes from being made on production
'allowAdminChanges' => true,
],
Error in the Network console...
404s...
2019-04-07 10:54:44 [-][-][dc567ad367247e3bf37e7ce11ac60e93][error][yii\web\HttpException:404] yii\web\NotFoundHttpException: Template not found: favicon.ico in C:\WinNMP\WWW\craft\vendor\craftcms\cms\src\controllers\TemplatesController.php:70 Stack trace: 0 [internal function]: craft\controllers\TemplatesController->actionRender('favicon.ico', Array) 1 C:\WinNMP\WWW\craft\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array) 2 C:\WinNMP\WWW\craft\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array) 3 C:\WinNMP\WWW\craft\vendor\craftcms\cms\src\web\Controller.php(109): yii\base\Controller->runAction('render', Array) 4 C:\WinNMP\WWW\craft\vendor\yiisoft\yii2\base\Module.php(528): craft\web\Controller->runAction('render', Array) 5 C:\WinNMP\WWW\craft\vendor\craftcms\cms\src\web\Application.php(297): yii\base\Module->runAction('templates/rende...', Array) 6 C:\WinNMP\WWW\craft\vendor\yiisoft\yii2\web\Application.php(103): craft\web\Application->runAction('templates/rende...', Array) 7 C:\WinNMP\WWW\craft\vendor\craftcms\cms\src\web\Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request)) 8 C:\WinNMP\WWW\craft\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request)) 9 C:\WinNMP\WWW\craft\web\index.php(21): yii\base\Application->run() 10 {main}