Discover nginx server name localhost, include the articles, news, trends, analysis and practical advice about nginx server name localhost on alibabacloud.com
The following code is based on rules for nginx sub-directory 301 to other domain names (URLs. The role is for example to access the http://www.111cn.net/phper/php.html (there are bars and no bars are different, the following code can be seen), automatic 301 to the http://php.111cn.net The code is as follows:Copy code Location ~ * ^/Phper /{Rewrite ^/phper/(. *) $ http://php.111cn.net/#1 permanent;} Test Successful. OK!For example, myname.netingcn
:
Hkey_local_machinesystemcurrentcontrolsetservicestcpipparameters3. Click New on the Edit menu, and then add the following registry key: Value Name: MaxUserPortValue type: DWORDValue data: 65534 (note is decimal)Valid range: 5000-65534 (decimal)Default value: 0x1388 (50,000)
Other issues
Unable to connect to the MySQL server, as possible:
1, the MySQL service does not start, generally in the case of th
bottom of the additional response to the request of the Realsver (back-end real server) information, easy to system administrators troubleshooting.3, you manage a large number of virtual host, in the back of all the Web to append your advertising code, black chain or something (very shameless)4, extrapolate, think about what you can do for yourself.What does Taobao use it for?Open Taobao home page, look at his source code, and drag to the bottom, the
@ localhostnginx] $ vi conf/nginx. conf
Find this in nginx. conf and add it to set load balancing to simulate CDN
Upstream dnsnginx1 {server [*. *. *. */yourhostname]: 8080 weight = 10000; # fill in IP address, domain name} server {listen 80; server_name # access_log logs/h
Windows environment, by deploying the same Web site to the different servers of IIS, and then through a unified nginx response proxy Server to provide unified access, to achieve a most simplified reverse proxy and load balancing services. However, limited by the experimental conditions , we are here mainly on a computer reverse proxy, IIS cluster simulation, the specific experimental environment as shown i
load the file to achieve the same effect.Create the configuration file in the/usr/local/nginx/conf directory under xnzj.conf.#======== The number of work-derived processes (recommended to be set to the same or twice times the number of CPU cores) ==========Worker_processes 1;#=========== Set the maximum number of connections ==============Events {Worker_connections1024;}#information about the ============http protocol ==============http {
Label:Cacti Monitoring Server configuration tutorial (based on centos+nginx+mysql+php Environment building)Specific cases:LAN has two hosts, a Linux, a Windows, now need to configure a cacti monitoring server to monitor the two hostsEnvironment Description:1. Linux HostOperating system: CentOS 6.2IP Address: 192.168.21.164Subnet Mask: 255.255.255.0Gateway: 192.16
storage server# The default value is 23000storage_server_port=23000# The group name of the local storage serverGroup_name=group1 #当前storage机器组名# if the Url/uri including the group name# set to False when Uri Like/m00/00/00/xxx# set to True when URIs like ${group_name}/m00/00/00/xxx, such as Group1/m00/xxx# default value is FalseUrl_have_group_name = True# path (
under Nginx to editDelete fields that you don't needSave is will error, direct click Yes, and then OK* Configure a server again, save the error continue to determineCreate a html81 directory under the Nginx directory under LinuxEnter html81 Enter index.html change welcome title to differentiate* Reload configuration fileAccess Port 81This completes a
/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/{# roo
, save the configuration information.4.2 Configuring Resource Information4.2.1, preparing the Web pageDownload jwplayer:www. jwplayer. com requires registration to download and obtain the corresponding license key (for example: 601u+htlhuxp5lqpeztrlaabkwyx/94l3lracg= =After downloading Jwplayer7.3.6.zip, extract to:/usr/local/nginx/html/Set up the test page test.html, also put in the above directory: 4.3, start n
$ TTL 1D @ in soasxkeji.com.cn rname. invalid. (0; serial1d; refresh1h; retry1w; expire3h); minimumns @ A 192.168.10.199wwwa 192.168.10.199maila 192.168.10.199
[Root @ server ~] #Service named restart
Test whether DNS resolution is successful[Root @ server ~] #Host www.sxkeji.com.cnWww.sxkeji.com.cn has address 192.168.10.199[Root @ server ~] #Host mail.sxk
PHP and Nginx Integration
PHP-FPM is also a third-party fastcgi process manager, which is developed as a patch in PHP, also need to compile with the PHP source code when installing, that is to say, PHP-FPM is compiled into the PHP kernel, so it is better to handle the performance At the same time it is much better at handling high concurrency than the spawn-fcgi engine, so it is recommended that nginx+php/
Nginx Series Links:An introduction and installation of Nginx high Performance Web server seriesWww.cnblogs.com/maxtgood/p/9597596.htmlThe second command management of Nginx High Performance Web server seriesWww.cnblogs.com/maxtgood/p/9597990.htmlThree-version upgrade of
This article mainly introduces how to connect PHP to the Nginx server and parse Nginx logs. PHP + Nginx is also a very popular server construction solution. For more information, see
Php and nginx integration
PHP-FPM is also a th
Because the company intranet has more than one server HTTP service to map to the company's external network static IP, if the port map with the route to do, you can only one intranet server 80-port map to the extranet 80 ports, the other server 80 ports can only map to the outside of the network of 80 ports. Non-80-port mapping in the access time to the domain
and change it
user nobody;
Modify the running command and run it in the/data/misc/nginx/sbin/directory.
./nginx -p /data/misc/nginx -c conf/nginx.conf
Run successfully.
Use commands
ps
You can view the running items:
root 2743 1 1328 456 c003f614 4002be64 S nginxnobody 2745 2743 1528 664 c00d8ad4 4002b7a4 S nginxroot 2748
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.