时间:2021-07-01 10:21:17 帮助过:6人阅读
#省略LoadModuleListen 80User apacheGroup apacheServerAdmin root@localhostServerName www.mydomian.com:80UseCanonicalName OffOptions FollowSymLinks AllowOverride None Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all DirectoryIndex index.html index.html.varAccessFileName .htaccess#上面的代码是httpd原配的,#省略若干行#下面的代码是网上找到的,直接添加在httpd结尾处,设置VirtualHost,#重新写一遍mydomian.com和sub.mydomian.com#浏览器貌似可以打开,但是这样写是不是合理呢?NameVirtualHost *:80ServerName mydomian.com ServerAlias www.mydomian.com DocumentRoot /var/www/html Options Indexes FollowSymLinks AllowOverride all Order Deny,Allow Deny from all Allow from all 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 Allow from all
* 换成 ip
* 换成 ip
只要这样吗?
上面要不要加 NameVirtualHost 2.3.4.5:80?
是的,不需要
给你个链接 http://jingyan.baidu.com/article/363872ec870f6e6e4ba16feb.html
描述的很清楚了
感谢,现在明白了。