jjzjj

virtualhost

全部标签

http - 为什么我的 http 请求 header 字段中缺少主机?

我正在打印所有标题,我得到:map[Cookie:[_ga=GA1.2.843429125.1462575405]User-Agent:[Mozilla/5.0(Macintosh;IntelMacOSX10_11_3)AppleWebKit/601.4.4(KHTML,likeGecko)Version/9.0.3Safari/601.4.4]Accept-Language:[en-us]Accept-Encoding:[gzip,deflate]Connection:[keep-alive]Accept:[text/html,application/xhtml+xml,applic

linux - 为什么所有不匹配的流量都转到第一个 VirtualHost 而不是 httpd.conf 中的默认站点配置

我一直想知道为什么所有不匹配的流量都转到第一个VirtualHost而不是httpd.conf中的默认站点配置?假设httpd.conf没有被编辑。我创建了一个名为/etc/httpd/conf.d/vhost.conf的文件具有以下内容:ServerNamewebsite.comServerAliaswww.website.comDocumentRoot"/site1"AllowOverrideAllRequireallgrantedSomeRulesHereServerNameexample.comServerAliaswww.example.comDocumentRoot"/si

linux - 为什么所有不匹配的流量都转到第一个 VirtualHost 而不是 httpd.conf 中的默认站点配置

我一直想知道为什么所有不匹配的流量都转到第一个VirtualHost而不是httpd.conf中的默认站点配置?假设httpd.conf没有被编辑。我创建了一个名为/etc/httpd/conf.d/vhost.conf的文件具有以下内容:ServerNamewebsite.comServerAliaswww.website.comDocumentRoot"/site1"AllowOverrideAllRequireallgrantedSomeRulesHereServerNameexample.comServerAliaswww.example.comDocumentRoot"/si

linux - 没有 www 的虚拟主机 2 重定向到虚拟主机 1

我的httpd.conf看起来像这样:NameVirtualHost*:80DocumentRoot/var/www/host1.comServerNamehost1.comServerAliaswww.host1.comDocumentRoot/var/www/host1.com/subdomainServerNamesubdomain.host1.comServerAliaswww.subdomain.host1.comDocumentRoot/var/www/host2.comServerNamehost2.comServerAliaswww.host2.com所以,一切正常,除

linux - 没有 www 的虚拟主机 2 重定向到虚拟主机 1

我的httpd.conf看起来像这样:NameVirtualHost*:80DocumentRoot/var/www/host1.comServerNamehost1.comServerAliaswww.host1.comDocumentRoot/var/www/host1.com/subdomainServerNamesubdomain.host1.comServerAliaswww.subdomain.host1.comDocumentRoot/var/www/host2.comServerNamehost2.comServerAliaswww.host2.com所以,一切正常,除

php - VirtualHost 在 CentOS 7 上的 Apache 2.4.6 下不工作

我试图在CentOS7上的Apache2.4.6中设置一些VH,但没有成功,因为它不工作。这是我到目前为止所尝试的:自/etc/httpd/conf/httpd.conf这条线是Includeconf.modules.d/*.conf然后我在/etc/httpd/conf.d/vhost.conf下创建一个文件并将其放入其中:NameVirtualHost*:80ServerNamewebserverServerAliaslocalhostdevserverdevelopmentDocumentRoot/var/www/html重新加载/重启Apache服务(都试过了):service

php - VirtualHost 在 CentOS 7 上的 Apache 2.4.6 下不工作

我试图在CentOS7上的Apache2.4.6中设置一些VH,但没有成功,因为它不工作。这是我到目前为止所尝试的:自/etc/httpd/conf/httpd.conf这条线是Includeconf.modules.d/*.conf然后我在/etc/httpd/conf.d/vhost.conf下创建一个文件并将其放入其中:NameVirtualHost*:80ServerNamewebserverServerAliaslocalhostdevserverdevelopmentDocumentRoot/var/www/html重新加载/重启Apache服务(都试过了):service

linux - 如何在没有证书(Apache VirtualHosts)的情况下将 HTTPS 请求重定向到 HTTP 并避免证书警告

Iwouldfirstliketofirstsay,thisisnotgoodpracticeandweshouldendevourtohaveeverythingonHTTPS100%ofthetimebutinthiscaseIhadaseriesofawkwardrequirementsonasystemthatdidnotholdsensitiveinformation.IwasquiteignorantofhowHTTPS/TLSworkedwhenaskingthisquestionbackwhenIwasmorejuniorbuthaveleftitinplacetohe

linux - 如何在没有证书(Apache VirtualHosts)的情况下将 HTTPS 请求重定向到 HTTP 并避免证书警告

Iwouldfirstliketofirstsay,thisisnotgoodpracticeandweshouldendevourtohaveeverythingonHTTPS100%ofthetimebutinthiscaseIhadaseriesofawkwardrequirementsonasystemthatdidnotholdsensitiveinformation.IwasquiteignorantofhowHTTPS/TLSworkedwhenaskingthisquestionbackwhenIwasmorejuniorbuthaveleftitinplacetohe

php - 没有域名的Apache虚拟主机

我有一台安装了apache2的VPS,我想访问一些没有域名的PHP项目,只需要IP地址。例如:http://162.243.93.216/projecta/index.phphttp://162.243.93.216/projectb/index.php我在我的目录/var/www/中还有其他项目,其域为example.com/html/info.php/projecta//projectb//example/当我去http://162.243.93.216/info.phpthen/var/www/html/info.phpisopened.我的文件000-default.confS