大网数据广告活动
服务器运维问答

Nginx - Wrong Response Header

· 52CE 我爱测

when installing joomla I face an issue realated to response header. During the installation process, an ajax post request send to server which in response status is 303 instead of 200 ! so ajax callback doesn't fire and installti…

问题原文

原帖链接 · Saman Mohamadi · CC BY-SA 3.0

when installing joomla I face an issue realated to response header.

During the installation process, an ajax post request send to server which in response status is 303 instead of 200 ! so ajax callback doesn't fire and installtion breaks.

I think this issue is related to nginx config because I test it on apache local server and there is no problem there.

nginx access log :

POST /installation/index.php HTTP/1.1" 303 5 "http://.../installation/index.php" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36"

apache (local) access log :

"POST /joomla-test/installation/index.php HTTP/1.1" 200 286

nginx config :

location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        #fastcgi_pass_header Status; <-- tested but not work !
        include fastcgi.conf;

    }

已采纳解答

原帖链接 · Bernard Rosset · CC BY-SA 3.0

HTTP 303 is a redirection.

There is nowhere in the configuration snippet you provide which creates any redirection whatsoever. It thus comes from a PHP file being processed in the block you are providing as I trust: you need to check the PHP application to fix this unwished redirection.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。