How to further set up subdomains in Apache httpd.conf, and subdomains use separate IP addresses. For example mydomian.com use IP for 1.2.3.4;www.sub.mydomian.com with IP as 2.3.4.5?
#省略LoadModuleListen 80User apachegroup apacheserveradmin root@localhostservername www.mydomian.com:80UseCanonicalName Off
Options followsymlinks allowoverride None
Options Indexes followsymlinks allowoverride all Order allow,deny
DirectoryIndex index.html index.html.varAccessFileName htaccess# The above code is httpd original, #省略若干行 # The following code is found online, directly added at the end of the httpd, Set VirtualHost, #重新写一遍mydomian. com and sub.mydomian.com# browsers seem to open, but is it reasonable to write this? Namevirtualhost *:80
ServerName mydomian.com serveralias www.mydomian.com documentroot/var/www/html
Option
S Indexes followsymlinks allowoverride all Order deny,allow Deny from all to
ServerName sub.mydomian.com serveralias www.sub.mydomian.com documentroot/var/www/html/sub
Options Indexes followsymlinks allowoverride all Order deny,allow Deny from all to ll
Reply to discussion (solution)
* Change to IP
* Change to IP
Is that all you need?
ServerName sub.mydomian.com serveralias www.sub.mydomian.com documentroot/var/www/html/sub
Options Indexes followsymlinks allowoverride all Order deny,allow Deny
from all to
Do you want to add Namevirtualhost 2.3.4.5:80?
Yes, no need.
Give you a link http://jingyan.baidu.com/article/363872ec870f6e6e4ba16feb.html
It's a very clear description.
Thanks, now understand.