Articles of 虚拟主机

.htaccess文件未加载PHP文件

我正在努力解决为什么加载.php文件时,我的.htaccess没有被考虑。 下面的文件坐在我的本地主机的webroot。 的.htaccess # Cause a HTTP 500 test file.html <html><body><h1>This should not show</h1></body></html> file.php <html><body><h1>This should not show</h1></body></html> 当我访问/index.html时,我得到预期的HTTP500当我访问/index.php时,html显示。 任何想法为什么.htaccess不会加载的PHP文件? Apache 2.4.6 VHost(/etc/httpd/vhosts.d/website.local.conf): <VirtualHost *:443> ServerName website.local ServerAlias www.website.local DocumentRoot /var/www/vhosts/website/website <Directory /var/www/vhosts/website/website> require all granted Options Indexes FollowSymLinks AllowOverride All </Directory> # Trigger PHP-FPM to run PHP execution <IfModule proxy_fcgi_module> ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/www/vhosts/website/php-fpm.sock|fcgi://website/var/www/vhosts/website/website" […]

Apache 2.4 SSL _default_覆盖虚拟主机

我有一个Apache 2.4服务器,我已经创build了一个自签名证书,用于testinghttps与新的客户端站点。 我遇到的问题是,当我尝试转到在单独的vhosts.conf文件中设置的定义的虚拟主机时,始终为我的站点加载ssl.conf文件。 有人可以帮我理解为什么所需的虚拟主机永远不会加载,只有默认是? 我的ssl.conf内容 Listen 443 https SSL Global Context SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog SSLSessionCache shmcb:/run/httpd/sslcache(512000) SSLSessionCacheTimeout 300 SSLRandomSeed startup file:/dev/urandom 256 SSLRandomSeed connect builtin SSLCryptoDevice builtin <VirtualHost _default_:443> DocumentRoot "/var/www/html" ServerName localhost:443 ErrorLog logs/default_ssl_error_log TransferLog logs/default_ssl_access_log LogLevel warn SSLEngine on SSLProtocol all -SSLv2 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA SSLCertificateFile /etc/pki/tls/certs/localhost.crt SSLCertificateKeyFile /etc/pki/tls/private/localhost.key <Files ~ "\.(cgi|shtml|phtml|php3?)$"> SSLOptions +StdEnvVars </Files> […]

虚拟主机具有与hostnamectl设置的系统主机名相同的ServerName时出现错误Http 404

所以,我试图在我的Centos 7 Cloud VPS中为phpMyAdmin创build一个虚拟主机,但是当我尝试查看它时,出现错误http 404,如果NameServer与hostnamectl set-hostname webserver.exampledomain.tld 这里是configuration文件: /etc/httpd/conf/httpd.conf中: # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT […]

apache2.4上的多个虚拟主机获取AH00959:ap_proxy_connect_backend禁用worker(主机)60秒

我们在Win 2012服务器上为Apache2.4configuration了多个虚拟主机。 如果其中一个端口正在提高AH00959: ap_proxy_connect_backend disabling worker (host) for 60s它AH00959: ap_proxy_connect_backend disabling worker (host) for 60s会阻止Apache服务器在同一个时隙向其他端口发送请求?

Apache默认虚拟主机未按正确顺序加载

Apache / 2.4.6(CentOS) 有一段时间了,我已经为我的Apache服务器设置了一个catchall页面设置,所以漫游器不会抓取我的主站点,除非他们有我的域名。 不过最近,我注意到这不再适用于我的configuration。 当通过IP地址(比如10.20.20.10)加载页面时,我得到主站点(比如说mysite.net)而不是catchall。 configuration看起来像这样: <VirtualHost _default_:80> ServerName default # More config … </VirtualHost> <VirtualHost _default_:443> ServerName default # More config … </VirtualHost> <VirtualHost 10.20.20.10:80> ServerName mysite.net # More config … </VirtualHost> <VirtualHost 10.20.20.10:443> ServerName mysite.net # More config … </VirtualHost> 运行apachectl -S向我透露,它没有被加载为默认值: 10.20.20.10:443 is a NameVirtualHost default server mysite.net (/etc/httpd/sites-enabled/01-mysite.conf:24) port 443 […]

多个子域指向与主域相同的目录

我有一个域名托pipe在Godode,并在Linode托pipe。 我添加了附加的屏幕截图是我的DNS设置。 蓝色突出显示区域是我把我的托pipe服务器的IP地址 现在我有3个网站在我的服务器上访问 domain.store admin.domain.store operator.domain.store我的主域中有一个DOT ,就像domain.store是我的主doamin。 在Apache ,我创build了3个不同的conf文件 000-default.conf 的Myproj-admin.conf中 的Myproj-operator.conf 每个文件的内容是一样的,(指向它们各自的目录)。 000-default.conf <VirtualHost *:80> ServerName www.admin.domain.store ServerAdmin [email protected] # Change the paths below to the project document root such as /var/www/project1. DocumentRoot /var/www/adminProject/public <Directory /var/www/adminProject/public> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory> # Set Default Log Paths ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog […]

Apache2,请禁用所有虚拟主机的letsencrypt目录中的rewite

使用vhosts和letsencrypt证书运行Apache 2.4.7(Ubuntu 14.04)。 许多虚拟主机运行WordPress创build一个.htaccess文件。 我已经排除了这些.htaccess文件中的.well-known文件夹,但是定期更新WordPress或插件来擦除这些手动修改。 在每个虚拟主机下RewriteEngine off这个文件夹的RewriteEngine off会更好,但是这样做很困难,因为在<Location>指令下这样做是不被支持的。 从我所看到的<Directory>指令必须是特定的而不是相对的? 我有什么select? 鉴于我在Apache 2.4.7我可以活着添加RewriteOptions Inherit到每个虚拟主机configuration。 但是想避免为每个虚拟主机添加定制的configuration。

Apache DocumentRoot Ubuntu虚拟主机

我对Ubuntu 16.4上的Apache服务器上的虚拟主机的设置感到困惑。 我没有按照这个指示在Ubuntu上安装Processmaker。 一切工作正常,但如果我访问我的网站: http : //process.koina.eu : 8080我只看到/var/www/html/index.html下的默认Apache文件。 但是我的过程控制器位于/ opt / processmaker下的指令中。 在日志中一切似乎运行良好。 问题是我的pmos.conf没有被添加/识别到Appacheconfiguration。 当我运行“sudo a2ensite pmos.conf”或a2dissite命令并重新启动服务器时,这并没有什么区别。

VirtualDocumentRoot,但自动从example.com或example.com.auredirect到www.example.com和www.example.com.au

我在我的http.conf中有以下设置: <VirtualHost *:80> UseCanonicalName Off VirtualDocumentRoot "/var/www/sites/%0/_site" </VirtualHost> 这一切都很好(我有/var/www/sites/www.example1.com/_site,/var/www/sites/www.example2.com.au/_site等)。 添加一个网站就像添加一个目录一样简单! 不过,我现在想要确保不pipe域名被称为什么,如果用户转到example1.com ,她将被HTTPredirect到www.example1.com 。 有没有简单的方法来做到这一点,而不会失去上述的简洁性? 我有大约84个主机,并试图优化我的httpd.conf … Merc。

通过外部dynamicip将域路由到本地networking上的不同服务器

我一直在阅读和学习很多,但是这是我第一次在这里发表一个问题。 这就是这样的情况: – 我有几台Web服务器(CentOS 7 + Apache),其中一些使用KVM和一台物理服务器,在本地networking中运行。 – 该networking使用dynamicIP连接到互联网。 – 目前,我添加一个端口redirect到路由器为了访问不同的networking服务器。 例如,如果我需要访问我的web服务器在192.168.0.33我使用mydomain.dyndns.org:8033,路由器映射外部端口8033与192.168.0.33机器的内部端口80。 这就是我所需要的: – 我想有一种中间服务(bind9?proxy?vhosts?任何东西!)来充当apache的虚拟主机,以将域路由到内部IP。 例如,当我想要访问192.168.0.33的networking应用程序,我只使用domain33.dyndns.org。 – 如果可能的话,我希望能够制作子域名。 例如,使用webapp1.domain.dyndns.org来访问特定的apache目录。 对不起,如果这是一个愚蠢的问题,并提前谢谢。 问候, Damon H.