nginx:

server {
server_name www.xx.com xx.com;
access_log /data/wwwlogs/www.xx.com_nginx.log combined;
index index.html index.htm index.php;
root /home/f/data/wwwroot/www.xx.com/xx/public;
if ($host != www.xx.com) { return $scheme://www.xx.com$request_uri; }
############################## xu add ########## #if (!-e $request_filename) {
#rewrite ^(.*)$ /index.php?s=/$ last;
#break;
#} ############################### end #################################
location / {
try_files $uri @apache;
}
location @apache {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
proxy_hide_header Upgrade;
}
location ~ .*\.(php|php5|cgi|pl)?$ {
proxy_pass http://127.0.0.1:88;
include proxy.conf;
proxy_hide_header Upgrade;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}

apache:

<VirtualHost *:>
ServerAdmin admin@example.com
DocumentRoot "/home/f/data/wwwroot/www.xx.com/xx/public"
ServerName www.xx.com
ServerAlias xx.com ErrorLog "/data/wwwlogs/www.xx.com_error_apache.log"
CustomLog "/data/wwwlogs/www.xx.com_apache.log" common
<Directory "/home/f/data/wwwroot/www.xx.com/xx/public">
SetOutputFilter DEFLATE
Options FollowSymLinks ExecCGI
Require all granted
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>

简单配置 nginx 转发 Tomcat :

server {
listen 80;
server_name shxt.yadanmall.com;
access_log /data/wwwlogs/shxt.yadanmall.com_nginx.log combined;
index index.html index.htm index.php;
root /home/f/data/wwwroot/shxt; location / {
proxy_pass http://localhost:8080;
}
}

  

最新文章

  1. mac osx 安装redis扩展
  2. git管理工具的使用教程
  3. 【iOS】Objective-C简约而不简单的单例模式
  4. linux直接启动到字符界面或从字符界面启动到图形化界面
  5. 3-08. 栈模拟队列(25)(ZJU_PAT 模拟)
  6. GZIP压缩、解压缩工具类
  7. ThinkPHP项目总结
  8. Python C++扩展
  9. 【视频编解码&#183;学习笔记】2. H.264简介
  10. 外观模式 门面模式 Facade 结构型 设计模式(十三)
  11. idea springboot jrebel hotreloaded
  12. python 字符串 转 bit, bitarray 异或加密
  13. MySQL优化:使用show status查看MySQL服务器状态信息
  14. NOI2019 SX 模拟赛 no.5
  15. Navicat使用ssh连接数据库
  16. 笔记:Python 默认参数必须指向不变对象
  17. 【洛谷P1522】牛的旅行
  18. c++并发编程之互斥锁(mutex)的使用方法
  19. eclipse常用插件介绍
  20. Vim的分屏功能

热门文章

  1. AspNetCoreapi 使用 Docker + Centos 7部署
  2. 【1】Asp.Net Core2.2从环境配置到应用建立
  3. [转]Windows10中Virtualbox没办法选择和安装64位的Linux系统
  4. jQuery(九)、ajax对象操作
  5. es6之字符串添加的东西
  6. 关于javascript异步
  7. 碰到了通过Movie显示gif图片,有部分图片的duration为0导致gif只显示第一帧
  8. iOS:我的学习路径
  9. &lt;%@ Register TagPrefix=&quot;uc1&quot; TagName=&quot;user&quot; Src=&quot;../Control/user.ascx&quot; %&gt;什么意思?
  10. python中json文件处理涉及的四个函数json.dumps()和json.loads()、json.dump()和json.load()的区分