windows php下不能请求自己的接口解决
发布日期:2021-11-18 19:17:31
浏览次数:9
分类:技术文章
本文共 1163 字,大约阅读时间需要 3 分钟。
cmd进入php目录下 输入 start php-cgi.exe -b 127.0.0.1:9001 -c php.ini 开启90001端口
nginx配置指向同一个目录 这样可以解决 windows 请求不到自己接口的问题
server { listen 80; server_name server_name ; root "*******";location / {
autoindex on; index index.html index.htm index.php; try_files $uri $uri/ /index.php?$query_string; }error_page 500 502 503 504 /50x.html;
location = /50x.html { }location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }location ~ .*\.(gif|jpg|png|htm|html|css|js|flv|ico|swf)(.*) {
add_header Cache-Control no-store; }
}
server {
listen 80; server_name server_name ; root "******"; location / { autoindex on; index index.html index.htm; try_files $uri $uri/ /index.php?$query_string; } error_page 500 502 503 504 /50x.html; location = /50x.html { } location ^~ /python/ { alias "*****"; //虚拟目录}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9001; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }location ~ .*\.(gif|jpg|png|htm|html|css|js|flv|ico|swf)(.*) {
add_header Cache-Control no-store; }}
转载地址:https://blog.csdn.net/weixin_39201566/article/details/86150927 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
不错!
[***.144.177.141]2024年04月24日 07时00分50秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
多路IO复用模型 select epoll 等
2019-04-27
Linux Epoll介绍和程序实例
2019-04-27
output_buffering详细介绍
2019-04-27
php缓冲 output_buffering和ob_start
2019-04-27
php error_reporting 详解
2019-04-27
剖析PHP中的输出缓冲
2019-04-27
HTTP响应头不缓存
2019-04-27
apache的keepalive和keepalivetimeout(apache优化)
2019-04-27
内容协商 (Content Negotiation)
2019-04-27
关于URL编码
2019-04-27
HTTP中的缓存
2019-04-27
Varnish 和 Squid比较到底强多少
2019-04-27
mysql常用语句集锦
2019-04-27
PHP的Smarty
2019-04-27
ecshop模板的原理分析
2019-04-27
深入探究Smarty模版
2019-04-27
PHP高效率写法(详解原因)
2019-04-27
PHP数组实际占用内存大小的分析
2019-04-27
PHP运行模式
2019-04-27
MYSQL的MERGE存储引擎
2019-04-27