Discover nginx server name localhost, include the articles, news, trends, analysis and practical advice about nginx server name localhost on alibabacloud.com
Nginx's default virtual host takes effect when a user accesses through IP or through a domain name that is not set (such as when someone points his own domain name to your IP).
For example, when someone accesses your website via IP or unknown domain name, you want to suppress any valid content and return 444 to him.At present, many domestic computer rooms are re
Nginx is a very lightweight HTTP server written by Russians, written in an event-driven manner, so it has very good performance and is also a very efficient reverse proxy, load balancing. It has the performance of matching lighttpd, and there is no lighttpd memory leak problem, and lighttpd Mod_proxy has some problems and has not been updated for a long time.
So I'm going to use it instead of Apache on Lin
Ask nginx to add a domain name. -- Linux Enterprise Application-Linux server application information. For details, refer to the following section. Ask nginx to add a domain name. I have Tao on the Internet for a while and I have learned a little bit. Please give me some advi
Server {Listen80; server_name the domain name corresponding to the Ngin server; Error_log/data/logs/nginx/Mainsite.error.log; Access_log/data/logs/nginx/Mainsite.access.log Main; #error_log logs/Error.log Notice; #error_log logs/Error.log Info; Location^~/api/{//"/api/" u
Tomcat Port: 8080 do the virtual hostNginx Port: 80 assigned by domain name
Increase in HTTP in conf/nginx.conf
Copy Code code as follows:
Include www.jb51.net.conf
New conf/www.jb51.net.conf, which reads as follows:
Copy Code code as follows:
server {
Listen 80;
server_name www.jb51.net;
Location/{Proxy_pass http://127.0.0.1:8080;Proxy_set_header Host $
running bin, you can find that a jdk1.6. * directory is added under the/usr/local directory, so that jdk installation is complete, and then set the jdk environment variable, data in the remote Black window of linux is java-version. if the correct version is displayed, you will succeed.3. install tomcatThis is also the installation of .tar.gz, which is similar to nginx installation.Tar-zxvf tomcat-5.0 .*./ConfigureMakeMake install4. install mysqlThe r
,serversuch as the aboveSet $game _name game4;2.if instructionif (condition) {...}The scope of action isSuch as:if ($host ~ "game-taiwan-5"){Set $game _name game5;}The IF directive is used to check if a condition conforms, and if the condition is met, the contents inside the curly braces are executed.Reference Documentation:Http://serverfault.com/questions/241005/nginx-change-root-directory-based-on-server-
When configuring the Nginx server today, the configuration file check reports:Cocould not build the server_names_hash, you shocould increase server_names_hash_bucket_size: 32Check a WIKI and see the following content:The hash table that saves the server name is controlled by the command server_names_hash_max_size and s
LNMP Nginx If you want to redirect domain name 111cn.net 301 to Www.111cn.net, and Www.111cn.net has been added through Lnmp vhost Add,
You can modify the following steps.
Edit the corresponding virtual host configuration file, the general virtual host configuration file is located in:/usr/local/nginx/conf/vhost/domain name
Virtual Host service based on IP and name;
GET interface of Memcached;
Support keep-alive and pipeline connection;
Flexible and simple configuration;
Reconfiguration and online upgrade without interrupting customer's work process;
Customizable access logs, log write cache, and fast log back volumes;
4XX-5XX error code redirection;
Rewrite rewrite module based on PCRE;
Access control based on client IP address
; # 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; sendfile on; keepalive_timeout 65; include extra/upstream01.conf ;} ####################################### Delete we do not need to add this line of content include extra/upstream01.conf; then we need to create upstream01.conf under the extra directory and ed
name, and then installs three CentOS in VMware.
Test domain name: a.com
Server a ip address: 192.168.5.149 (master)
Server B IP address: 192.168.5.27
C server IP address: 192.168.5.126
Deployment ideasServer A serves as the master serve
filter conditions; "balancer: // proxy/" indicates that you want to configure server load balancer, the proxy indicates the name of the server load balancer instance. the BalancerMember and its URL indicate the backend server to be configured. the URL is the URL requested by the backend
nginx installation.Tar-zxvf tomcat-5.0 .*./ConfigureMakeMake install4. Install mysqlThe rpm format is used here. There are two files in total, one server and one client.Installation is complete. If you enterMysql. If it works properly, it indicates that the installation is successful. Add the user name to the root user.Mysql-u root-p and enter your password.Ther
Generally after we upload the resource file, in order to avoid file name conflicts, the file name will be changed to a meaningless paragraph of characters. This character, may be generated by MD5, or otherwise generated by the string. At this point, when downloading, the default file name saved will be the meaningless filename (Figure 1).
In fact,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.