Write the installation configuration httpd service domain-based virtual host script
Requirements:
1, automatic installation, basic configuration
2, through the prompt input domain name, website root directory, and so on to complete the virtual
Because of the need, the jkmount instructions that would otherwise work in the global domain mod_jk.conf only work in a certain domain:In fact, I want to make Jkmount/*.htm controller only take effect in the virtual domain.Original configuration:Apache httpd.conf:Include "conf/mod_jk.conf"Mod_jk.conf:LoadModule Jk_module modules/mod_jk-1.2.23-apache-2.2.x-linux-i686.soJkworkersfile conf/workers.propertiesJk
, device names are stored in/dev. device names follow certain rules. For example, in/dev/hda1, hd indicates Hard Disk, and a indicates the first Hard Disk device, 1 represents the first primary partition of the first hard disk.④ Dir: the mount point of the device on the system ). For example, the mount point we just created:/mnt/mystudy
Follow this rule to mount the second primary partition of the hard disk,Type the command: # mount-t ntfs/dev/hda2/mnt/mystudyReturned information: Mount: fs type
If we have only one server, how do we implement a request for this server to process both PHP and JSP?The solution here is to port forwarding via the Apache virtual Host (vhost).Apache forwards requests to different ports or different servers by accessing the domain name of the server.0X00 Prerequisite Purpose
Premise:has a domain name, and has two a parsing, simultaneously resolves to this server's IPEac
① Installing the Apache server$ sudo apt-get update$ sudo apt-get install apache2② Configuring a single IP multi-site$ sudo vi/etc/apache2/sites-available/000-default.conf#DocumentRoot/var/www/html comment out the line$ cat/etc/apache2/sites-available/000-default.conf|grep-v "#"ServerAdmin [email protected]ServerName www.tian.comDocumentRoot "/var/www/tian.com"Errorlog ${apache_log_dir}/error.logCustomlog ${apache_log_dir}/access.log combinedServerName www.baidu.orgDocumentRoot "/var/www/baidu.o
One, download AMH
Amysql Host Official: http://amysql.com/AMH.htm
AMH Demo: Http://72.46.130.140:8888/index.php?c=indexa=login
Account: AMH, Password: Amh_password
Second, the panel with its own module
AMH supports CentOS, DeBian, and Ubuntu Adaptive installation, which is standard for AMH 4.1.
Nginx 1.2.9, MySQL 5.5.33, PHP 5.3.27, pureftpd 1.0.36
Third, installation method
Use a pure Linux system
Wampserver2.5 download, installation, and virtual host configuration1. Download wampserver2.5. 2. After wampserver2.5 is installed, click "next" until the installation is successful. After the installation is completed, a green icon appears in the lower-right corner of the computer, as shown in the highlighted red box, the default value is English. Now we switch to chinese. 3. For wampserver
Original: http://blog.csdn.net/ReadyYes/article/details/51038192
Enter C:\Apache24\conf\httpd.conf
Get rid of that "#" number.
Enter the C:\Apache24\conf\extra\httpd-vhosts.conf configuration as follows
#* represents all IP addresses of the current server
#主机名ServerNameWww.zy.com#主机别名 Multiple host aliases separated by spacesServeraliasZy.com xy.comServerAdminAdmin@zy.comDocumentRoot"E:/phptest"the
First check to see if the/etc/httpd/conf/extra/httpd-vhosts.conf exists, if you do not need to create one, the contents are as follows:#绑定的主域ServerName centos7.xxx.com#绑定的子域名Serveralias localhost#网站主目录documentroot/var/www/html/#日志配置Errorlog/var/log/httpd/error.logCustomlog/var/log/httpd/access.log Common#ServerSignature OFF#测试一的配置Options FollowSymLinksAllowOverride AllRequire all grantedConfirm the following configuration entries for the Apache master
Open httpd.conf FileGet rid of the LoadModule vhost_alias_module modules/mod_vhost_alias.so in front of the #Get rid of the # # in front of the include conf/extra/httpd-vhosts.confThen open the httpd-vhosts.conf file under \conf\extra in the Apache directory, and add the following code#配置自己的虚拟主机#网站目录, if the PHP directory under the WWW directory, the following #就填写F:/www/phpDocumentRoot "d:/www/php/"#域名ServerName www.abc.com#这里配置欢迎首页面DirectoryIndex index.html index.htm index.phpOptions FollowSym
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
Today I configured the virtual directory, the following is my configuration method.1 edit httpd.conf, find include conf/extra/httpd-vhosts.conf, delete the previous comment symbol "#".2 Edit httpd-vhosts.conf, I put wampserver installed in D:/wamp, so my path here is D:\wamp\Apache2\conf\extra.Empty or annotate the contents, and replace them with the following:
Namevirtualhost *:80
This is the new e
Serveralias www.dummy-host.abc.ccom
ErrorLog "Logs/dummy-host.abc.com-error.log"
Customlog "Logs/dummy-host.abc.com-access.log" common
ServerAdmin webmaster@dummy-host2.abc.com
DocumentRoot "G:\PHP\ABC"
ServerName dummy-host2.abc.com
ErrorLog "Logs/dummy-host2.abc.com-error.log"
Customlog "Logs/dummy-host2.abc.com-access.log" common
7, save and restart Apache.
Note:1, the above code is mainly modified port and directory, 80 port corresponding directory for the g:\php,8080 port c
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/
VirtualHost is a technology used to build multiple website services with different domain names or based on different IP addresses on the same machine. you can specify different IP addresses and ports for each website running on the same physical machine, or assign different domain names to multiple websites. apache is the most widely used Web server in the world. It has supported virtual hosts since version 1.1. this article will explain how to RedHa
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.