首页 > 编程知识 正文

服务器未配置为有效的NPS,nginx修改配置文件路径

时间:2023-05-06 07:54:39 阅读:126565 作者:702

下载nginx文件并打开此目录,以创建新的vhost文件夹

2

2在2nginx.conf文件中修改

#用户nobody; 工作器_ processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; 事件{ worker _ connections 1024; }http { include mime.types; efault _ type应用程序/octet-stream; # log _ format main ' $ remote _ addr-$ remote _ user [ $ time _ local ] ' $ request ' # ' $ status $ body _ $ $ sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; # anothervirtualhostusingmixofip -,name-,and port-based configuration # # server { # listen 8000; #监听器somename :8080; # server _ namesomenamealiasanother.alias; # location/{ # root html; # index index.html index.htm; #}#}#https服务器##服务器{#Listen443SSL; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # SSL _ session _ cache shared : SSL :1 m; # ssl_session_timeout 5m; # ssl_ciphers HIGH: aNULL: MD5; # ssl_prefer_server_ciphers on; # location/{ # root html; # index index.html index.htm; # } #}include vhost/*.conf; 您可以在vhost文件夹中创建多个配置文件来区分多个服务器,这有助于进行故障排除

4gis_map.conf配置文件是

服务器{ listen 8091; server_name localhost; wldyx; rootf :\ GIS _ project\ data\ GIS _ map; location/{ try _ files $ uri $ uri/@ router; index index.htmlindex.htm index.PHP; } location @ router { rewrite ^.* $/index.html last; }位置/API/{ proxy _ pass http://localhost :8088/API/proxy _ http _ version 1.1; proxy_set_header Connection ' '; proxy_redirect default; proxy_set_header Host $host; proxy _ set _ headerx-real-IP $ remote _ addr; proxy _ set _ header remote-host $ remote _ addr; proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for; add _ header access -控制- allow-origin *; add _ header access-control-allow-methods ' get,POST,PUT,OPTIONS '; add _ header access-control-expose-headers ' accept-ranges,Content-Encoding,Content-Length,content-range '

服务器{ listen 8092; server_name localhost; wldyx; rootf :\ GIS _ project\ data\ GIS _ map _ 2; location/{ try _ files $ uri $ uri/@ router; index index.htmlindex.htm index.PHP; } location @ router { rewrite ^.* $/index.html last; }位置/API/{ proxy _ pass http://localhost :8078/API/proxy _ http _ version 1.1; proxy_set_header Connection ' '; proxy_redirect default; proxy_set_header Host $host; proxy _ set _ headerx-real-IP $ remote _ addr; proxy _ set _ header remote-host $ remote _ addr; proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for; add _ header access -控制- allow-origin *; add _ header access-control-allow-methods ' get,POST,PUT,OPTIONS '; add _ header access-control-expose-headers ' accept-ranges,Content-Encoding,Content-Length,content-range ' proxy_set_header Connection ' '; proxy_redirect default; proxy_set_header Host $host; proxy _ set _ headerx-real-IP $ remote _ addr; proxy _ set _ header remote-host $ remote _ addr; proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for; add _ header access -控制- allow-origin *; add _ header access-control-allow-methods ' get,POST,PUT,OPTIONS '; add _ header access-control-expose-headers ' accept-ranges,Content-Encoding,Content-Length,content-range '

服务器{ listen 8089; server_name localhost; wldyx; 位置/{ add _ header access-control-allow-origin *; add _ header access -控制- allow-methods ' get,POST '; add _ header access-control-allow-xxd kfd,X-Mx-ReqToken,Keep-Alive,俏皮柚子,X-Requested-With,if-modifie }位置/sy-img/{ add _ header access-control-allow-origin *; add _ header access -控制- allow-methods ' get,POST '; add _ header access-control-allow-xxd kfd,X-Mx-ReqToken,Keep-Alive,俏皮柚子,X-Requested-With,if-modifie }位置/sy-terrain/{ add _ header access-control-allow-origin *; add _ header access -控制- allow-methods ' get,POST '; add _ header access-control-allow-xxd kfd,X-Mx-ReqToken,Keep-Alive,俏皮柚子,X-Requested-With,if-modifie }位置/shenyangjiedao/{ add _ header access-control-allow-origin *; add _ header access -控制- allow-methods ' get,POST '; add _ header access-control-allow-xxd kfd,X-Mx-ReqToken,Keep-Alive,俏皮柚子,X-Requested-With,if-modifie }7如下

服务器{ listen 8010; server_name localhost; wldyx; rootd :/nginx-1.16.1/Zhengzhou/web/dist; location/{ try _ files $ uri $ uri/@ router; index index.htmlindex.htm index.PHP; } location @ router { rewrite ^.* $/index.html last; } location/Zhengzhou/{ proxy _ pass http://localhost 33608090/proxy _ http _ version 1.1; proxy_set_header Connection ' '; proxy_redirect default; proxy_set_header Host $host; proxy _ set _ headerx-real-IP $ remote _ addr; proxy _ set _ header remote-host $ remote _ addr; proxy _ set _ headerx-forwarded-for $ proxy _ add _ x _ forwarded _ for; add _ header access -控制- allow-origin *; add _ header access-control-allow-methods ' get,POST,PUT,OPTIONS '; add _ header access-control-expose-headers ' accept-ranges,Content-Encoding,Content-Length,Content-Range' } '

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。