想了解VirtualHostconfiguration的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于19.1.2SwitchVirtualInterfaceConfiguration
想了解VirtualHostconfiguration的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于19.1.2 Switch Virtual Interface Configuration、@Configuration配置和@ConfigurationProperties加载外部配置注解的使用。、c# – System.Configuration.ConfigurationManager未解析、c# – 在localhost开发期间是否可以选择Azure ServiceConfiguration?例如.云?的新知识。
本文目录一览:- VirtualHostconfiguration
- 19.1.2 Switch Virtual Interface Configuration
- @Configuration配置和@ConfigurationProperties加载外部配置注解的使用。
- c# – System.Configuration.ConfigurationManager未解析
- c# – 在localhost开发期间是否可以选择Azure ServiceConfiguration?例如.云?
VirtualHostconfiguration
我需要在我的Ubuntu PC中configuration两个基于名称的虚拟主机。 如果我在浏览器中键入地址http://mypage1 ,它应该显示我的第一个自定义的html页面,如果我键入地址http://mypage2 ,它应该显示我的第二个自定义的html页面。 我尝试了以下内容:
安装了apache
在sites-available内部创build了一个文件mypage1 ,其内容如下:
<VirtualHost *:80> ServerName mypage1 ServerAlias http://mypage1 DocumentRoot /var/www/mypage1/html </VirtualHost>
在sites-available内部创build了一个类似的文件mypage2
运行命令a2ensite mypage1和a2ensite mypage2以在启用站点的内部生成软链接。
使用sudo /etc/init.d/apache2 restart启动apache
完成上述步骤后,当我在firefox中键入mypage1时,出现dns_unresolved_hostname错误。
Tomcat Cookie不能通过我的ProxyPass VirtualHost工作
VirtualDocumentRoot处理不存在的文件夹
我如何在Apache上为虚拟主机设置不同的SSL证书?
没有域名的Apache虚拟主机
Nginx反向代理设置,连接到上游时,768个worker_connections是不够的
请帮助我如何解决这个问题。
(使用phusion乘客+ Nginx)运行相同的轨道应用与多个实例名称相同的端口(80)
Apache – 如何将前缀映射到不同的目录
PHP – 每个虚拟主机不同的open_basedir
如何在Ubuntu上为Apache2configuration子域名?
Apache默认的VirtualHost
DNS未解决意味着它说的是什么! 它无法找到名为mypage1或mypage2的“服务器”的DNS条目。
把它们添加到你的/ etc / hosts文件中
127.0.0.1 mypage1 mypage2
如果你成功了,那么你可能会得到一个不同的错误,那么你可以开始查看虚拟主机配置
首先,你应该设置一个NameVirtualHost作为你打算从中提供文件的IP。 (如果不这样做,Apache通常会忽略服务器名称,只是先使用任何已定义/包含的站点)。
另外,请确保“mypage1”和“mypage2”是实际有效的域名,或放在/ etc / hosts中。 Apache知道它们并不会自动使它们在Apache以外的任何地方知道 – 尤其是在你的机器的DNS解析器上。
总结
以上是小编为你收集整理的VirtualHostconfiguration全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
19.1.2 Switch Virtual Interface Configuration
To access the switch remotely, an IP address and a subnet mask must be configured on the switch virtual interface (SVI). To configure an SVI on a switch, use the interface vlan 1 global configuration command. Vlan 1 is not an actual physical interface but a virtual one. Next, assign an IPv4 address using the ip address ip-address subnet-mask interface configuration command. Finally, enable the virtual interface using the no shutdown interface configuration command.
After the switch is configured with these commands, the switch has all the IPv4 elements ready for communication over the network.
Note: Similar to Windows hosts, switches configured with an IPv4 address will typically also need to have a default gateway assigned. This can be done using the ip default-gateway ip-address global configuration command. The ip-address parameter would be the IPv4 address of the local router on the network, as shown in the example. However, in this topic you will only be configuring a network with switches and hosts. Routers will be configured later.
@Configuration配置和@ConfigurationProperties加载外部配置注解的使用。
那么在Spring boot项目中,应用上下文又是如何找到那么多配置并加载初始化好的呢?
@SpringBootApplication
spring boot项目推荐大家在主类中标注@SpringBootApplication这个注解,我们来看看它的源码:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration //配置
@EnableAutoConfiguration //启用自动配置
//组件扫描
@ComponentScan(excludeFilters = @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class))
public @interface SpringBootApplication {
//需要排除的自动配置类
Class<?>[] exclude() default {};
//需要排除的自动配置类类名
String[] excludeName() default {};
//扫描包路径
@AliasFor(annotation = ComponentScan.class, attribute = "basePackages")
String[] scanBasePackages() default {};
//扫描包路径类
@AliasFor(annotation = ComponentScan.class, attribute = "basePackageClasses")
Class<?>[] scanBasePackageClasses() default {};
}
@EnableAutoConfiguration
我们发现一个配置开关注解,名字叫@EnableAutoConfiguration,看看它的源码:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@AutoConfigurationPackage
@Import(EnableAutoConfigurationImportSelector.class)
public @interface EnableAutoConfiguration {
//是否启用自动配置的总开关名
String ENABLED_OVERRIDE_PROPERTY = "spring.boot.enableautoconfiguration";
//需要排除的自动配置类
Class<?>[] exclude() default {};
//需要排除的自动配置类类名
String[] excludeName() default {};
}
EnableAutoConfigurationImportSelector
我们看到有一个@Import导入了选择器EnableAutoConfigurationImportSelector.class,看看它的源码:
public class EnableAutoConfigurationImportSelector
implements DeferredImportSelector, BeanClassLoaderAware, ResourceLoaderAware,
BeanFactoryAware, EnvironmentAware, Ordered {
...
c# – System.Configuration.ConfigurationManager未解析
using System.Configuration;
然后在我的代码中:
string primary_adrs_key = ConfigurationManager.AppSettings["PrimaryAddressK"];
但我得到错误:
“The name ConfigurationManager does not exist in the current context”
为什么?我错过了什么?
解决方法
在项目中添加引用System.Configuration.dll
c# – 在localhost开发期间是否可以选择Azure ServiceConfiguration?例如.云?
当我调试我的角色时,它使用本地服务配置.
是否可以说请使用云配置,即使我知道这是我的本地主机?
解决方法
>选择“属性”
>转到“开发”标签
>选择您的服务配置
在Cloud Service Project上选择属性时,您将看到此窗口:
顺便说一句,您知道您可以维护的不仅仅是这两种服务配置 – 尽可能多.
今天的关于VirtualHostconfiguration的分享已经结束,谢谢您的关注,如果想了解更多关于19.1.2 Switch Virtual Interface Configuration、@Configuration配置和@ConfigurationProperties加载外部配置注解的使用。、c# – System.Configuration.ConfigurationManager未解析、c# – 在localhost开发期间是否可以选择Azure ServiceConfiguration?例如.云?的相关知识,请在本站进行查询。
本文标签: