|
本帖最后由 eremiter 于 2016年12月13日 10:31 编辑
下载一个jekpos2.3.4, https://github.com/jekkos/opensourcepos 在apache运行正常 但在nginx1.2 因PATH_INFO问题,可以登入首页,但输入用户名和密码,就会提示页面不存在。 于是搜索相关教程设置。变成连首页都无法看到了。提示502 Bad Gateway注:nginx1.2.7是正常的,因另一网站dedecms可以正常运行 环境:centos6.3 nginx1.2.7 pos.test.cn 域名我换了一下,实际不是test PHP复制代码 server { listen 80; server_name pos .test.cn; root /home/wwwroot/pos ; index index.php index.html default.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php($|/) { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /\.ht { deny all; } } 下面的配置 ,可以登入首页,但输入用户名和密码,跳转到一页面,提示找不到,应该是控制器pathinfo问题 PHP复制代码 server { listen 80; server_name pos .test.cn; index index.html index.htm index.php default.php default.html; root /home/wwwroot/pos ; location ~ .*\.(php|php5)?$ { try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fcgi.conf; } location /status { stub_status on; access_log off; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } } | |
|
nginx 配置参考 https://www.nginx.com/resources/ ... ecipes/codeigniter/ 不要在网上搜索,很多不靠谱。
| |
Hex 发表于 2016年12月12日 17:14 谢谢版主,这个网站无法打开,估计也是全英文,看得也累 我干脆再去下载3.0 ,在apache2.4安装成功,但里面的菜单 store config 一点击就会卡死,郁闷 nginx的配置要php5.5,目前是php5.3,pos3又不支持,嗨 我的环境win10+php5.5+mysql5.5,你有空试一下嘛,谢谢 | |