ini nginx.conf
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini nginx.conf相关的知识,希望对你有一定的参考价值。
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/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 /var/log/nginx/access.log main;
server {
listen 80;
server_name hbsfc.co.il;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name hbsfc.co.il;
ssl on;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
location / {
try_files $uri $uri/ /index.html;
}
location = /50x.html {
root /usr/share/nginx/html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}
}
以上是关于ini nginx.conf的主要内容,如果未能解决你的问题,请参考以下文章
ini 为nginx改变了prerender.io nginx.conf
ini nginx.conf
ini Nginx conf
ini nginx.conf
ini nginx.conf
ini Nginx Conf - Gzip