nginx - 가상 도 메 인 이름과 다 중 포트 감청 및 설정 및 nginx 명령
22143 단어 전단
설정 이 올 바른 지 검증: nginx - t Nginx 버 전 번호 보기: nginx - V 시작 Nginx: start nginx 빠 른 정지 또는 닫 기 Nginx: nginx - s stop 정상 정지 또는 닫 기 Nginx: nginx - s quit 프로필 수정 다시 불 러 오기 명령: nginx - s reload
nginx 설정
#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;
server {
listen 82;
server_name localhost;
root D:/cardLoan/tuandai-loans/loans-web-admin/src/main/resources/web;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root D:/cardLoan/tuandai-loans/loans-web-admin/src/main/resources/web;
index index.html index.htm;
}
#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 {
# alias E:/aaa2
#}
# 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;
# }
#}
server {
listen 80;
server_name dq.aaa.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
proxy_pass http://10.100.66.255:9007;
proxy_redirect default ;
}
}
#server {
#listen 80;
#server_name www.aaa.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
#location / {
#proxy_pass http://127.0.0.1:8081;
#proxy_redirect default ;
#}
#}
server {
listen 80;
server_name psjs.aaa.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
location /dq {
alias E:/psjs.aaa.cn-static/dq;
#root E:/td-sail-js;
index index.html index.htm;
}
location /scripts {
alias E:/psjs.aaa.cn-static/dq/scripts;
}
location /images {
alias E:/psjs.aaa.cn-static/dq/images;
#root E:/td-sail-js;
index index.html index.htm;
}
}
server {
listen 80;
server_name js2.aaa.cn;
#root E:/aaa2/js.aaa.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root E:/psjs.aaa.cn-static;
index index.html index.htm;
}
location /images {
alias E:/psjs.aaa.cn-static/images;
index index.html index.htm;
}
#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 {
# alias E:/aaa2
#}
# 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;
#}
}
}
MP 설정 방식 nginx. conf
#
# : nginx
# : nginx -s reload
# : nginx -s stop
# 1 + 。 nginx 。
# ,windows
#user benny staff;
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;
gzip_min_length 1k;
gzip_buffers 16 64k;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_types text/plain application/x-javascript text/css application/xml application/javascript;
gzip_vary on;
# localhost , d:/wwwroot
server {
listen 90;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
#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;
#}
}
# include vhosts/*.conf; # vhosts
include vhosts/cardloan.dev.com.conf;
autoindex on; # nginx
autoindex_exact_size off; # KB
autoindex_localtime on; #
# 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;
# }
#}
}
vhost.conf
# ?
# 1、
# 2、 root ,
# 3、 nginx -s reload
server {
listen 82;
server_name cardload.dev.com;
root D:/cardLoan/tuandai-loans/loans-web-admin/src/main/resources/web;
index index.html index.htm;
error_page 500 502 503 504 /50x.html;
location ~ /.ht {
deny all;
}
}
인터넷 에서 찾 은 카드 dev. com. conf
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
upstream localhost {
server 127.0.0.1:8080 max_fails=7 fail_timeout=7s;
}
server {
listen 81;
server_name localhost;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost;
}
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost;
}
}
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
전단 자동화 워 크 플 로 의 hooks예 를 들 어 우 리 는 git commt 전에 eslint 코드 검사, npm install 전에 프로젝트 의존 도 를 검사 하고 싶 습 니 다.전형 적 인 상황 에서 각종 도 구 는 특정한 동작 이 발생 할 때 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.