nginx www + slim sample1 > Linux/Apm

본문 바로가기
사이트 내 전체검색

Linux/Apm

nginx www + slim sample1

페이지 정보

작성자 sbLAB 댓글 0건 조회 933회 작성일 23-06-16 13:26

본문

user nginx;

worker_processes auto;

pid /run/nginx.pid;


include /etc/nginx/modules-enabled/*.conf;


events {

        worker_connections 768;

        # multi_accept on;

}


http {

        sendfile on;

        tcp_nopush on;

        types_hash_max_size 2048;

        server_names_hash_bucket_size 64;


        # server_tokens off;

        # server_name_in_redirect off;

        #gzip on;


        include /etc/nginx/mime.types;

        default_type application/octet-stream;



        #ssl

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE

        ssl_prefer_server_ciphers on;


        #log

        access_log /var/log/nginx/access.log;

        error_log /var/log/nginx/error.log;


        #server www + slim  ------------------------------------

        server {

           listen       80;

           server_name  www.11.com;


           root /var/www/html;


           #charset koi8-r;

           #access_log  logs/host.access.log  main;


           location / {

                index  index.html index.htm index.php;

           }



           location /slimapi/public {

              try_files $uri /slimapi/public/index.php$is_args$args;

           } 



           location /server-status {

              stub_status on;

              access_log off;

              allow all;

           }


    location ~ \.php {

        try_files $uri =404;

        fastcgi_split_path_info ^(.+\.php)(/.+)$;

        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;

        fastcgi_param SCRIPT_NAME $fastcgi_script_name;

        fastcgi_index index.php;

        fastcgi_pass unix:/run/php/php8.1-fpm.sock;

    }


           #*.php-fpm

           #location ~ \.php$ {

           #try_files $uri =404;

           #include fastcgi.conf;

           #include fastcgi_params;

           #fastcgi_index index.php;

           #fastcgi_pass unix:/run/php/php8.1-fpm.sock;

           #}


          }



       #server  slim ------------------------------------

        server {

           listen       80;

           server_name  slim.11.com;


           root /var/www/html/slimapi/public;


           #charset koi8-r;

           #access_log  logs/host.access.log  main;


           location / {

              #rewrite

              try_files $uri /index.php$is_args$args;

           }



           location /server-status {

              stub_status on;

              access_log off;

              allow all;

           }


           #*.php-fpm

           location ~ \.php$ {

              try_files $uri =404;

              fastcgi_split_path_info ^(.+\.php)(/.+)$;

              include fastcgi.conf;

              include fastcgi_params;

              fastcgi_index index.php;

              fastcgi_pass unix:/run/php/php8.1-fpm.sock;

             }


          }


        include /etc/nginx/conf.d/*.conf;

}


댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
6
어제
310
최대
1,279
전체
204,261

그누보드5
Copyright © sebom.com All rights reserved.