美文网首页
nginx域名配置

nginx域名配置

作者: 我的楼兰0909 | 来源:发表于2018-12-10 09:58 被阅读0次
server {
        listen 80;
        server_name hrms.jhongnet.com;
        root /data/web/app/hrms/www/public;
        index index.html index.htm index.php;
        location / {
                if (!-e $request_filename){
                        rewrite ^/index.php(.*)$ /index.php?s=$1 last;
                        rewrite ^(.*)$ /index.php?s=$1 last;
                         break;
                 }
        }
        location ~ .*\.(php|php5)?$
        {
             fastcgi_pass  127.0.0.1:9000;
             fastcgi_index index.php;
             fastcgi_split_path_info ^(.+\.php)(.*)$;
             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
             include  fastcgi_params;
        }
 
}
 
 
 
server {
        listen       80;
        server_name  zengchenhua.yiimine.com;
        root   /home/zengchenhua/web/yii2_mine/web;
        
        access_log /home/zengchenhua/log/nginx/access.log;
        error_log  /home/zengchenhua/log/nginx/error.log;
        
        location / {
            index index.php;
            try_files $uri $uri/ /index.php$is_args$args;
        }
        location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            #fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index  index.php;
            include fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
        }
    }
 
 
 
server {
        listen       80;
        server_name  www.perchen.com;
        root   /data/per/public;
 
 
       if (!-e $request_filename) {
          rewrite  ^(.*)$  /index.php/$1  last;
          break;
       }
       location / {
            index  index.html index.htm index.php;
            #autoindex  on;
       }
       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;
       }
}



server {
    listen       80;
    server_name  www.laravel58.com;
    root   "D:/Web/laravel58/public";
    location / {
        index  index.html index.htm index.php;
        autoindex  on;
        # 伪静态配置
        if (!-e $request_filename) {
            rewrite  ^(.*)$  /index.php?s=$1  last;
            break;
        }
    }
    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;
        fastcgi_param TP_ENV  sixian;
    }
}

相关文章

网友评论

      本文标题:nginx域名配置

      本文链接:https://www.haomeiwen.com/subject/tzhthqtx.html