nginx config
广州朗尊软件科技有限公司成立于2014年,公司立足自我创业,专门从事web开发及系统集成业务服务,系统咨询服务和集成
#user nobody;
worker_processes 2;
#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 {
upstream nginx.legendshop.com {
server localhost:8080;
server localhost:8082;
}
include mime.types;
default_type application/octet-stream;
client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
proxy_buffer_size 4k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
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;
proxy_ignore_client_abort on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
###禁止通过ip访问站点
server{
server_name _;
return 404;
access_log off;
}
server {
listen 82;
server_name localhost;
index index.html index.htm index.jsp;#设定访问的默认首页地址
#charset utf-8;
access_log logs/legend.access.log main;
location / {
root html;
proxy_pass http://nginx.legendshop.com;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
# 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;
# server_name localhost;
# ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
文章来源:广州朗尊软件科技有限公司
【朗尊软件】是中国领先的专业电商平台提供商,秉承着"专业塑造传奇,用心成就电商"的理念,专注于为用户提供一体化的电商解决方案及服务,搭建垂直行业垂直电商一站式营销管理工具。目前拥有自主研发的电子商务平台产品:SAAS云平台、微商城小程序、云商城、云小店、代理商平台、B2B2C商城、B2B大宗交易平台、跨境电商服务、大数据平台搭建、微服务架构等产品、各种定制商城及解决方案。
网站声明:以上内容为朗尊软件官方网站的原创文章,如需转载,请注明出处,谢谢合作!