site opened will appear no input files, So what's the solution?
We can send different virtual hosts to different php-cgi ports for processing, of course, the response of the PHP-FPM configuration file in the Open_basedir is also different. Let's take a look at how to configure.
First, the nginx.conf configuration is as follows
Server{Listen 80;server_name www.a.com;Index index.html index.htm index.php;root/data/htdocs/www.a.com/;
#limit_conn craw
~ \.php$ {Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params; }}In this configuration write pseudo-static rules, support PHP is the following location ~\.pjp$.After the configuration is finished to detect the correct configuration of Nginx, use nginx-t and then restart
Create the Vhosts directory under the Conf directory and create the site's configuration file, taking examples.com.conf as an example.
The code is as follows
Copy Code
[Root@localhost ~]# cd/usr/local/nginx/[Root@localhost nginx]# mkdir-p conf/vhosts[Root@localhost nginx]# Vim conf/vhosts/examples.com.conf
The examples.com.co
server { listen ; server_name zuqiu.com; # Set up your domain Index index.html index.htm index.php; Root D:/wnmp/www/dev/zuqiu; # Set your program path Location ~ \.php { root D:/wnmp/www/dev/zuqiu; # Set your program path Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params; # support
server {server_name xxx.com; #这个是需要访问的域名Root/srv/www/; #web访问根目录也就是index. PHP Directory Location /{try_files$uri/app_dev.php$is _args$args; } Location~ ^/(app_dev|config) \.php (/|$) {#location中 ~ starts to represent the regular expression Fastcgi_pass127.0.0.1:9000; #指定FastCGI server address fastcgi_split_path_info^ (. +\.php) (/.*)$; #通过正则表达式获取脚本名 $fastcgi _script_name and Parameters includeFastcgi_params; #包含fastcgi_params, the file is fastcgi_param in the same directory as nginx.conf script_
Configuration Steps:1, in the Nginx installation directory, find nginx.conf folder, new Vhost folder2. Add the include vhost/*.conf at the end of nginx.conf http{};3. Enter the file you created in the first step, and create the desired configuration file kt.conf4. Edit kt.conf Add the following contentServer {listen80; server_name www. Kt.hd; Root C:/www/kt/; Index index. PHP index.html Index.htm; location/{try_files$uri $uri//index.php$is _args$args;
First, what is a virtual host?A single httpserver can provide multiple HTTP services, which can be divided into the following virtual hosts depending on how they are accessed:1. Port Virtual Host2.IP Virtual Host3. Domain Name Virtual
Open the nginx installation directory/conf/nginx. conf file, find the http curly brackets, and add the following code. The code is as follows:Copy code Server {Listen 80; # port, which is usually the default value (required)Server_name www.111cn.net 111cn.net; # domain name. Multiple domain names are separated by spaces (required)Index index.html index.htm index. php; # default homepage document. Multip
The virtual host in the default configuration of Nginx allows the user to access through IP or through a domain name that is not set (e.g. someone maliciously points his own domain name to your IP)This is because the server area in the default configuration has this line:listen default;The following default parameter indicates that this is the default
Read the article on the Internet written by others: http://www.it165.net/os/html/201401/7063.htmlThe article uses Debian, I configure the virtual machine system one is Ubuntu 14.10, the other is Red Hat 5.0, virtual machine software is VitualboxFollow the steps in that article to complete the Ubuntu configuration, but Red Hat is a bit different.Briefly summarize, first turn off the
For example, you can set up a different domain name query interface and domain name registration interface, that is, you can use the new network domain name interface query, with a network of domain name interface registration. Different domain name types, you can use a different domain name interface to register. For example:. CN's domain name can be registered with the domain name interface of the new network interconnection,. com domain name can be registered with the domain name interface of
Apache Configure virtual host three ways, Apache virtual host
One, IP-based
1. Assume that the server has an IP address of 192.168.1.10, use Ifconfig to bind 3 IPs on the same network interface eth0:[Root@localhost root]# ifconfig eth0:1 192.168.1.11
[Root@localhost root]# ifconfig eth0:2 192.168.1.12
[Root@localhost
Tomcat virtual host configuration and tomcat Virtual Host Configuration1. What is a VM?
Multiple web sites are built on one physical machine. Each web site runs independently and does not interfere with each other. These sites are "virtual hosts ".
How to implement a VM:
1.
I installed the virtual machine in the Windows7 system, through the virtual machine installed Ubuntu13.04, I set the host and the virtual Machine connection mode is bridged, installed, found that the virtual machine ping does not host
Tags: http OS ar Div SP art on C efHost and Virtual Machine Ping, but the host cannot access the virtual machine service solution 1. the local machine can ping the Virtual Machine 2. the virtual machine can also ping the local machine. 3.
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.