#user nobody;
worker_processes 1; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; server {
listen 80;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / {
root /data/app/mall;
try_files $uri $uri/ /index.html;
index index.html index.htm;
} location /house {
rewrite ^.+house/?(.*)$ /$1 break;
include uwsgi_params;
proxy_pass http://localhost:9002;
}
# location /marryPhphoutai/ {
# fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
# include fastcgi_params;
# } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 4;
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
# location ~ \.php$ {
# proxy_pass http://127.0.0.1;
# } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
# location ~ \.php$ {
# root /data/app/marry/api;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
# } location ~ \.php$ {
root /data/app/mall;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
} # location ~ \.php(.*)$ {
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_param PATH_INFO $fastcgi_path_info;
# fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
# include fastcgi_params;
# } # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

nginx带有Java(前后分离)和PHP环境的配置的更多相关文章

  1. Java中jdk安装与环境变量配置

    Java中jdk安装与环境变量配置 提示:下面是jdk1.7和jdk1.8的百度网盘链接 链接:https://pan.baidu.com/s/1SuHf4KlwpiG1zrf1LLAERQ 提取码: ...

  2. java Android SDK安装与环境变量配置以及开发第一个Android程序

    JAVA的安装与环境变量的配置 1.先下载JAVA,并且安装. 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3 ...

  3. java、maven、tomcat 环境变量配置

    Linux 配置java.maven.tomcat 环境变量 打开 /etc/profile 在下面写上 # java env JAVA_HOME=/usr/local/tools/java   (j ...

  4. Java学习笔记2、环境变量配置与初学者常见错误

    2.1 环境变量的配置   2.1.1 path环境变量配置的作用 程序的执行需要使用外部指令javac,但是javac指令仅仅能在JDK安装目录下的bin目录下运行,因此程序只能写入bin目录程序开 ...

  5. 【Java】JDK安装及环境变量配置

    第一步:下载所需jdk(本次下载Win64位 java1.8...版本) 第二步:点击文件安装,直接下一步到底,成功安装,点击关闭. 第三步:安装完JDK后配置环境变量  计算机→属性→高级系统设置→ ...

  6. JAVA JDK安装及path环境变量配置

    JDK安装 JVM  :JAVA虚拟机 JRE :java运行环境=JVM+核心类库 JDK :JAVA开发工具包=JRE+java开发工具 java开发工具:编译工具(javac.exe) . 运行 ...

  7. Java的JDK以及maven环境变量配置

    右键我的电脑->属性->高级->环境变量->系统变量 新建变量名(win7,win10系统变量)JAVA_HOME变量值填写D:\Java\jdk1.8.0_172为jdk的安 ...

  8. Nginx部署前后端分离的单页应用配置

    #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #erro ...

  9. Core Java 学习笔记——1.术语/环境配置/Eclipse汉化字体快捷键/API文档

    今天起开始学习Java,学习用书为Core Java.之前有过C的经验.准备把自己学习这一本书时的各种想法,不易理解的,重要的都记录下来.希望以后回顾起来能温故知新吧.也希望自己能够坚持把自己学习这本 ...

  10. win7环境下配置Java环境

    ==下载Java SE Development Kit 8u45== http://www.oracle.com/technetwork/java/javase/downloads/jdk8-down ...

随机推荐

  1. odoo接口

    @http.route('/zimo_lunch/select/<string:db_name>', type='http', auth='none')def trash_demo(sel ...

  2. 高德API获取省市区---python3实现

    # -*- coding: utf-8 -*- """ Created on Thu Nov 4 15:40:25 2021 @author: 何双新 "&qu ...

  3. PyQt实现跨平台毛玻璃背景(全网首发)

    找了很久,大部分都需要调用 win32 API 无法跨平台,终于找到啦 项目地址 安装: python -m pip install BlurWindow 简单例子 import sys from P ...

  4. K8s新手系列之指定Pod调度到指定节点上

    概述 在 Kubernetes 中,Pod的调度是通过kube-schedule来实现的,Pod的调度会经过一系列算法来进行完成. 在实际生产过程中,我们想让Pod调度到我们想要的节点上,往往通过ku ...

  5. 基于nodejs的本地文件增删改查的工具代码

    一.代码封装 这是一个使用node.js实现的对本地文件进行增删改查的工具代码封装,其中代码结尾包含了使用方法示例,具体封装代码如下: // jsonTool.js const fs = requir ...

  6. kubernetes集群之GC处理

    一.简单说明 GC(Garbage Collector)即垃圾收集清理,kubernetes集群中,kubelet的GC功能将会清理未使用的image和container.其中kubelet对cont ...

  7. JVM 类加载过程与字节码执行深度解析

    在 Java 高级程序员面试中,类加载机制与字节码执行原理是 JVM 模块的核心考察点.本文从类加载生命周期.类加载器协作机制.字节码执行引擎及面试高频问题四个维度,结合 JVM 规范与 HotSpo ...

  8. 后端性能-batch 化的想法

    项目中我们提高性能或者吞吐经常使用的是 batch 化,比如说获取帐号信息,我们1条1条查询可能不如我们一次查询100条性能高. 有的时候想这样是为什么呢?因为单个请求中间有网络往返.网络延迟等原因会 ...

  9. 给Markdown渲染网页增加一个目录组件(Vite+Vditor+Handlebars)(下)

    1 引言 在上一篇文章<给Markdown渲染网页增加一个目录组件(Vite+Vditor+Handlebars)(上)>中笔者介绍了如何实现在Markdown渲染网页中加一个目录组件.不 ...

  10. 开源直播课丨大数据集成框架ChunJun类加载器隔离方案探索及实践

    本期我们带大家回顾一下无倦同学的直播分享<ChunJun类加载器隔离>,ChunJun类加载器隔离的方案是我们近期探索的一个新方案,这个方案目前还不是非常成熟,希望能借由此次分享与大家一起 ...