我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Nginx到Apache为PHP重新路由

I'm trying to use both Nginx and Apache concurrently, and have the need to use PHP to execute a contact script.

I have set Apache to listen on port 8080, while Nginx is listening on port 80.

My first attempt was to do this within the config of Nginx:

location ~ \.php$ {
    proxy_pass http://127.0.0.1:8080;
}

However when I attempted to execute the script online, it produced the following:

http://puu.sh/aCy05/d072e3052d.png

How do I configure Nginx so that it redirects the request through Apache (running PHP) and executes the script?

近期文章

  • 多个长并发MySQL查询
  • 在模式REGEX之后爆炸POST变量
  • Php Mysql总和选择返回的所有行
  • PHP / Wordpress / Woocommerce:防止读取url参数
  • too long
  • PHP读取错误的数据
  • PHP更新现有MySQL行或插入新行(混淆UPDATE ON DUPLICATE KEY)
  • 像Drupal一样干净的URL系统
  • php条件表单按日期验证
  • 从php网站的foursquare API获取数据
  • Tinymce编辑器图片上传插件上传路径网址
  • 如何配置mail()。php,所以我可以将它与gmail SMTP一起使用
  • too long
  • TCPDF - Codeigniter - 在控制器中获取数据
  • 在PHP中重定向[.htaccess像重定向]
  • laravel destroy函数生成错误的url
  • Javascript重复div包含表单的用户从dropbox中选择的次数
  • 安装php代码嗅探器时缺少PHP55
  • 无限卷轴错误,重复下10条记录而不是填充更多
  • 如何通过js或者jquery在点击不同的标签时设置不同的样式?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华