nginx配置laravel项目

server{
    listen  443;
    server_name  10.0.3.15
    ssl on;
    ssl_certificate /etc/nginx/conf.d/3i.crt;
    ssl_certificate /etc/nginx/conf.d/3i_nopass.key;
    root /var/www/html/3i-mobile/public;
    index index.php;
    location /{
        try_files $uri $uri/ /index.php?$query_string;
    }
    #error_page 404  /404.html
    
    error_page 500 502 503 504 /50x.html;
    location = /50x.html{
        root /usr/share/nginx/html;
    }
    location ~ \.php${
        root html;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME /var/www/html/3i-mobile/public/$fastcgi_script_name;
        include fastcgi_params;
    }
}
对应的Php配置文件
user = daemon
group = daemon
listen = 127.0.0.1:9000
listen = allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 80
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /var/log/php-fpm/www-slow.log
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session
php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache

相关推荐