user nginx;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# client_max_body_size 10m;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
站点配置文件
server {
listen 80;
listen 443 ssl;
server_name gclove.com;
root "/home/vagrant/Code/Laravel/public";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/homestead.app-error.log error;
sendfile off;
client_max_body_size 100m;
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
location ~ /.ht {
deny all;
}
ssl_certificate /etc/nginx/ssl/gclove.com.crt;
ssl_certificate_key /etc/nginx/ssl/gclove.com.key;
}
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/39248.html
摘要:流程大概是这样本地代码阿里云既然要使用,那么先在上安装安装完成就可以使用了,然后在上创建一个私有项目,里面包含所有该项目所需代码。 以下的配置都是在Ubuntu 14.04稳定支持版的环境中搭建Linux+Nginx+Mysql+PHP环境的 首先删除阿里云ECS的Linux中会给你预装Apache 通过下面的命令来删除Apache sudo service apache2 stop ...
摘要:在系统中安装本地开发环境在环境下安装开发环境,网上有很多相关教程其中大多都是环境,很多大神都是用户的。但是还是有很多像我这样的小弟还是用的系统,而在系统上面因为权限问题安装还是有各种问题发生。可以使用本地安装的方法。 在 windows10 系统中安装 homestead 本地开发环境 在 windows10 环境下安装 homestead 开发环境,网上有很多相关教程其中大多都是 m...
摘要:前言设置项目的域名站点的时候,需要对做一些对应的重写配置,用来做相关路由,否则会报。 前言 设置laravel项目的域名站点的时候,需要对nginx做一些对应的重写rewrite配置,用来做相关路由,否则会报404。 nginx.conf配置 server { listen 80; server_name xxx.com; #域名 root /data/www...
摘要:前言设置项目的域名站点的时候,需要对做一些对应的重写配置,用来做相关路由,否则会报。 前言 设置laravel项目的域名站点的时候,需要对nginx做一些对应的重写rewrite配置,用来做相关路由,否则会报404。 nginx.conf配置 server { listen 80; server_name xxx.com; #域名 root /data/www...
阅读 3958·2021-09-22 15:28
阅读 1493·2021-09-03 10:35
阅读 1079·2021-09-02 15:21
阅读 3618·2019-08-30 15:53
阅读 3625·2019-08-29 17:25
阅读 685·2019-08-29 13:22
阅读 1681·2019-08-28 18:15
阅读 2539·2019-08-26 13:57