zoukankan      html  css  js  c++  java
  • go:挂webserver

    apache配置:

    <VirtualHost *:80>
        ServerName test.com
        DocumentRoot /home/q/system/Engine/src/biz/www
    
        ProxyRequests Off 
        <Proxy *>
            Order deny,allow
            Allow from all 
        </Proxy>
        ProxyPass /conf/ !
        ProxyPass /package/ !
        ProxyPass / http://127.0.0.1:8082/
    
        <IfModule mod_deflate.c>
            SetOutputFilter DEFLATE
        </IfModule>
    
        CustomLog "|/usr/local/apache2/bin/rotatelogs /usr/local/apache2/logs/access_log.%Y%m%d 86400 480" combinedio
    </VirtualHost>

    nginx配置:

    server {
        listen       80;
        server_name  .a.com;
    
        charset utf-8;
        access_log  /home/a.com.access.log;
    
        location /(css|js|fonts|img)/ {
            access_log off;
            expires 1d;
    
            root "/path/to/app_a/static";
            try_files $uri @backend;
        }
    
        location / {
            try_files /_not_exists_ @backend;
        }
    
        location @backend {
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header Host            $http_host;
    
            proxy_pass http://127.0.0.1:8080;
        }
    }

    见以下链接的nginx和apache部署:http://beego.me/docs/deploy/nginx.md

  • 相关阅读:
    js函数动态传参
    js 异步加载
    js 遍历
    安卓——implements——OnClickListener
    安卓——BroadcastReceiver
    关于Linux下的硬链接
    Linux 的文件类型
    linux 学习
    虚函数与重载函数的区别
    虚函数和友元
  • 原文地址:https://www.cnblogs.com/helww/p/4260801.html
Copyright © 2011-2022 走看看