" file name:#vi/etc/sysconfig/network-scripts/ifcfg-ens192Open the command-line environment for the host (Win7 environment), enter the command ipconfig view the host's IP address and default gateway information.according to the host network card information, you need to configure the above file Ipaddr0 (IP address, the first three bits set to the same host, the l
Run multiple domain-based Web sites on an IP address.Your server has an IP address, and there are many mappings (cnames) to this machine in DNS. You and you want to run the www.example1.com and www.example2.org two sites on this machine.
AttentionCreating a virtual host in the configuration of your Apache server does not automatically update the
XAMPP basic Configuration tips for Linux (setting up a virtual host, adding an FTP account, etc.)XAMPP installed after the only one default site and a default nobody FTP account, which is clearly not in line with our usual needs, then the following is how to set up and manage multiple
/init.d/apache2 restart
(5) testHttp://localhost:8000/
If normal access is available, the configuration is correct.
Copy CodeThe code is as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine your can setup VirtualHost containers for them. Most configurations
# Use of name-based
Create a Xiangkejin Zhangsan two usersYou can see two users created in a file:Establish a virtual directory and configure user authentication① creating a virtual directory/xiangkejin② in the main configuration file httpd.conf file of Apache, add the following statementAlias/xiangkejin "/xkj"AuthType BasicAuthName "This is a private website"Authuserfile/etc/httpd/
Add Nginx Virtual HostThis assumes that everyone's Nginx server has been installed, do not understand the official documentation of the Linux distributions or LNMP installation instructions. Configure Virtual host steps as follows:Enter the/usr/local/nginx/conf/vhost directory to create the
/local/php/etc/php-fpm-game01.conf:
Listen.group = game01User=game01Group=game01Game02 with empathy. So we let PHP-FPM run with different users.
Then came/home/wwwroot/:
Chown Game01.game01-r game01Chown Game02.game02-r GAME02The GAME01 and GAME02 folders are given to users game01 and GAME02 respectively.
Again, our nginx is run by the WWW user by default, so it is unable to read game01, game02 user files, if the file permissions set to 777, and can not prevent game01 read game02 files.
The
surf the internetThat's what I've been doing. Three days, port modification, Linux firewall, host firewall, 360 are almost innocent deleted, IPsec Policy agent service I shut down and shut, virtual machine etc/selinux iptables .... Also do not know how much change, in short, in fact, I have been a good machine, is to ignore this point.OK, the DHCP will not choos
志
To modify the DNS resolution master configuration file
vim/etc/named.conf Front number for Vim editor serial number
Listen-on Port 53 {192.168.100.101;}; Modify the server address for your own IP address
allow-query {any;}; The listening port is for all
Vim/etc/named.rfc1912.zones Modifying a zone configuration file
Add two forward parsing
echo "NameServer 192.168.100.101" >/etc/
Installs Apache,php:yum install httpd PHP assumes that the VPS IP is 58.130.17.168, there are two domain names pointing to the IP, respectively domain1.com, domain2.com, modify/etc/httpd/conf/ Httpd.conf, added at the end of the document: ServerName 58.130.17.168 namevirtualhost 58.130.17.168 Install apache,php:Yum Install httpd PHPAssuming that the VPS IP is 58.130.17.168, there are two domain names pointing to the IP, respectively domain1.com, domain2.com,To modify the/etc/httpd/conf/httpd.con
/web1/index.htmlHello StudentContent of the second site:[[emailprotected] ~]# mkdir /var/www/web2[[emailprotected] ~]# vim /var/www/web2/index.htmlHello Engineer2) Add a new Web configuration, support two virtual web hosts, point to different web directoriesNew Virtual Host Con
) Restart service#/etc/init.d/apache2 restart
(5) testHttp://localhost:8000/
The configuration is correct if you are able to access it properly.
Copy Code code as follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Virtual Hosts
#
# If you are want to maintain multiple domains/hostnames on your
# machine can setup virtualhost containers for them. Most configurations
# Use only name-bas
~ \.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 a
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.