Last update at :2024-01-18,Edit by888u
This article mainly introduces the method of using nginx configuration to access wgcloud. Here you need to remember to write the 80 port of the agent's configuration file item serverUrl. Friends who need it can refer to it.
nginx configuration is as follows:
Such as http://172.17.188.27/wgcloud
server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location/{ proxy_pass http://172.17.188.27:9999; #roothtml; #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 { roothtml; } # 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; #} }Remember to also write the 80 port of the agent's configuration file item serverUrl, as follows:
#wgcloud-server access address, the port must be written, even if it is 80, it must be written. serverUrl=http://172.17.188.27:80Supplement: nginx configuration access wgcloud to improve access speed
upstream wgcloudServer { server 172.17.188.27:9999 weight=10; ip_hash; } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location/{ proxy_pass http://wgcloudServer; #roothtml; #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 { roothtml; }This concludes this article about using nginx configuration to access wgcloud. For more related articles, you can continue to follow our blog.
Recommended site search: Hong Kong vps host rental, proxy ip address, 6 yuan Alibaba cloud shared virtual host, Hong Kong cn2 server, .cn domain name registration, high-defense US server, virtual host server, US domain name registration, Wanwang registered domain name , Free virtual host application,
发表评论