[VueJsDev] 日志 - nginxConfig 配置文件备份
[VueJsDev] 目录列表
https://www.cnblogs.com/pengchenggang/p/17037320.html
nginxConfig 配置文件备份
::: details 目录
:::
备份下配置代码
Step. 1: 服务器 nginx config
代码备份
::: details 代码
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# 原来配置完https后,就走443的端口了,原先的配置 就都写到这里了
server {
listen 443 ssl;
server_name www.vuejsdev.com #你们的域名,如www.abc.com;
ssl on;
ssl_certificate /usr/local/nginx/public.pem; #根据实际的路径和文件名配置
ssl_certificate_key /usr/local/nginx/private.key; #根据实际的路径和文件名配置
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配
ssl_prefer_server_ciphers on;
location / {
proxy_pass http://127.0.0.1:8080/;
#index index.html index.htm;
}
location /api/ {
proxy_pass http://127.0.0.1:8081;
}
#location / {
# root html; #站点目录
# index index.html index.htm;
#}
}
server {
listen 80;
server_name vuejsdev.com,www.vuejsdev.com; # 绑定域名
#将请求转成https
rewrite ^(.*)$ https://$host$1 permanent;
#charset koi8-r;
#access_log logs/host.access.log main;
#root /root/website/;
location / {
proxy_pass http://127.0.0.1:8080/;
#index index.html index.htm;
}
location /api/ {
proxy_pass http://127.0.0.1:8081;
}
#location /8080 {
# proxy_pass http://127.0.0.1:8080/;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
:::
Step. 2: 宝塔 nginx 初始化配置
代码备份
::: details 代码
user www www;
worker_processes auto;
error_log /www/wwwlogs/nginx_error.log crit;
pid /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http
{
include mime.types;
#include luawaf.conf;
include proxy.conf;
default_type application/octet-stream;
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;
server_tokens off;
access_log off;
server
{
listen 888;
server_name phpmyadmin;
index index.html index.htm index.php;
root /www/server/phpmyadmin;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /www/wwwlogs/access.log;
}
include /www/server/panel/vhost/nginx/*.conf;
}
:::
[VueJsDev] 日志 - nginxConfig 配置文件备份的更多相关文章
- Xcode8中处理打印日志的配置
Xcode8中处理打印日志的配置
- 关于log4net日志的配置流程
最近又重新整理一下log4net日志的配置,现在记录一下流程和一些遇到的问题,以备后续使用,具体的配置参数等信息.此文无,见谅! 1. 下载log4net.dll文件(网上很多,随便找一个!) 2. ...
- C# 日志的配置流程
1. 下载log4net.dll文件 http://download.csdn.net/detail/abc456456456456/7653857 2. 项目中引用此dll 3. appconfig ...
- Tomcat访问日志详细配置
在server.xml里的<host>标签下加上 <Valve className="org.apache.catalina.valves.AccessLogValve&q ...
- IIS 7完全攻略之日志记录配置(摘自网络)
IIS 7完全攻略之日志记录配置 作者:泉之源 [IT168 专稿]除了 Windows 提供的日志记录功能外,IIS 7.0 还可以提供其他日志记录功能.例如,可以选择日志文件格式并指定要记录的请求 ...
- javaweb常用工具类及配置文件备份
Javaweb常用工具类及配置文件备份 做一个代码备份,以后常用到的. hibernate工具类备份 package com.dly.service; /* * hibernate获取sessi ...
- 网站运维工具使用iis日志分析工具分析iis日志(iis日志的配置)
我们只能通过各种系统日志来分析网站的运行状况,对于部署在IIS上的网站来说,IIS日志提供了最有价值的信息,我们可以通过它来分析网站的响应情况,来判断网站是否有性能问题,或者存在哪些需要改进的地方 对 ...
- java log4j基本配置及日志级别配置详解
java log4j日志级别配置详解 1.1 前言 说出来真是丢脸,最近被公司派到客户公司面试外包开发岗位,本来准备了什么redis.rabbitMQ.SSM框架的相关面试题以及自己做过的一些项目回顾 ...
- Logback日志基础配置以及自定义配置
Logback日志基础配置 logback日志配置有很多介绍,但是有几个非常基础的,容易忽略的.下面是最简单的一个配置,注意加粗的描述 <?xml version="1.0" ...
- nginx日志 logrotate配置
nginx 日志 logrotate配置如下: /var/log/nginx/*.log { daily missingok rotate 20 compress delaycompress noti ...
随机推荐
- SqlSugar分页查询
同步分页 int pagenumber= 1; // pagenumber是从1开始的不是从零开始的 int pageSize = 20; int totalCount=0; //单表分页 ...
- 10.2 调试事件获取DLL装载
理解了如何通过调试事件输出当前进程中寄存器信息,那么实现加载DLL模块也会变得很容易实现,加载DLL模块主要使用LOAD_DLL_DEBUG_EVENT这个通知事件,该事件可检测进程加载的模块信息,一 ...
- sed文本处理工具常见用法
sed的全称是stream editor, 表示它是一个流编译器.可以处理文本内容和终端命令的流标准输出,对文本做查找,替换,插入,删除操作. 它是把文件中的内容逐行copy到缓冲区,然后在缓冲区中进 ...
- 手把手教你-把Kali Linux系统安装到U盘 【超详细】(随身携带/即插即用)
[0-背景说明]: 1)为什么想要把Kali Linux系统安装到U盘? 之前学习渗透测试的时候,有安装过虚拟机,在虚拟机上安装Kali Linux系统,但是因为是在现有系统上安装虚拟机又安装kali ...
- pandas教程01: pandas的安装和基本操作
pandas是Python中常用的数据处理库,主要用来处理表格数据,类似于下面这种: 好好干文化有限公司员工薪资表 姓名 年龄 性别 年薪 奖金 久九刘 35 男 182600 42000 傅儿待 ...
- MarkDown文件插入图片(绝对\相对路径\调整图像大小位置)
1. 插入网络图片(有效网络连接) Markdown中插入图片的语法为,图片路径可以直接写入图片有效链接网址即可: 方法1: 方法2:<img src=&quo ...
- (C语言)每日代码||2023.12.23||for循环的循环条件部分可以是数字
#include <stdio.h> int main() { int i = 3; for (i; i; i--) { printf("%d\n", i); } // ...
- 扩展说明: 指令微调 Llama 2
这篇博客是一篇来自 Meta AI,关于指令微调 Llama 2 的扩展说明.旨在聚焦构建指令数据集,有了它,我们则可以使用自己的指令来微调 Llama 2 基础模型. 目标是构建一个能够基于输入内容 ...
- C++——编译和链接原理笔记
我们在学习和开发C++程序中,理解编译和链接的原理至关重要.下面将学习一下C++程序是如何从源代码转换为可执行文件的过程,并结合示例代码进行说明.也是为了解开自己在刚学习C++的时候,编译时间长的疑惑 ...
- Go 之烧脑的接口
基本定义 Go 官方对于接口的定义是一句话:An interface type is defined as a set of method signatures. 翻译过来就是,一个接口定义了一组方法 ...