apache nginx 配置

<VirtualHost *:80>
ServerAdmin test@biuuu.com
DocumentRoot E:\web\OTHER\test
ServerName zjh.com
ServerAlias *.zjh.com

rewriteengine on
rewritecond %{HTTP_HOST} [^.]+\.zjh\.com$
rewriterule ^(.+) %{HTTP_HOST}$1 [C]
rewriterule ([^.]+)\.zjh\.com(.*) http://192.168.1.214:8094/module/market/html/AboutMark.html?marketId=524   

<Directory E:\web\OTHER\test>
Options FollowSymLinks
AllowOverride all
Order deny,allow
allow from all
ErrorDocument 404 /404.htm
</Directory>

#反向代理设置
ProxyPass / balancer://mycluster
ProxyPassReverse / balancer://mycluster

<Proxy balancer://mycluster>
BalancerMember http://192.168.1.214:8094
</Proxy>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin test@biuuu.com
DocumentRoot E:\web\OTHER\laravel\public
ServerName laravel.cc
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common

<Directory E:\web\OTHER\laravel\public>
Options FollowSymLinks
AllowOverride all
Order deny,allow
allow from all
ErrorDocument 404 /404.htm
</Directory>

</VirtualHost>
server {
        listen 80;
        listen       443 ssl;
        server_name  redpacket.zhenhaipifa.com;
        access_log  /data/logs/nginx/redpacket.zhenhaipifa.com_https.log;
        error_log  /data/logs/nginx/redpacket.zhenhaipifa.com_error.log;
#       ssl on;
        ssl_certificate      /usr/local/nginx/cert/redpacker/214462399690518.pem;
        ssl_certificate_key  /usr/local/nginx/cert/redpacker/214462399690518.key;
        ssl_session_timeout  5m;
        ssl_session_cache    shared:SSL:1m;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
        ssl_prefer_server_ciphers on;

        charset utf-8;
        root   /usr/www/redpacket.zhenhaipifa.com;
        index index.html;

        location / {
                index  index.html index.htm index.php;
                if (!-e $request_filename){
                  rewrite  ^/index.php/(.*)\/(.*)\/(.*)$ /index.php?g=$1&m=$2&a=$3 last;
                }
               }

         location ~ \.php$ {
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_pass 127.0.0.1:9000;
              #  fastcgi_pass unix:/var/run/php5-fpm.sock;
                try_files $uri =404;
                }
}

  

posted on 2018-03-21 15:28  小V_chen  阅读(161)  评论(0编辑  收藏  举报

导航