因此,这让我感到困惑。我想在/etc/httpd.conf和/etc/httpd.conf.pre-update之间进行区分,并修正默认的LoadModules和包括升级应用的内容,但是我有很多vhosts不能很好地播放。所有的人都精在升级之前和沿的线条失败:埃尔卡皮坦升级和Apache VHost问题
http://localhost (DocumentRoot /www works fine)
http://test (DocumentRoot /www/test serves "It works!" from the standard DocumentRoot and nothing shows in /var/log/apache2/access_log)
http://test/index.php (works)
http://localhost/test (works)
httpd.conf中提取
DocumentRoot "/www"
<Directory "/www">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
的httpd-vhosts.conf提取
<VirtualHost *:80>
DocumentRoot "/www/test"
ServerName test
</VirtualHost>
的servername是在设定/ etc/hosts并且ping正确,并且在显式指定文件时工作,所以这看起来不错。也尝试与test.local(和测试ServerAlias)没有任何区别。
的DirectoryIndex已经被设置为其中没有什么区别,并作为http://localhost/test“正常供应的index.php,这看起来应该是“的index.php index.html的”。
当http://test被访问,它从/Library/WebServer/Documents/index.html.en返回标准的“It works!”文件,该目录仅从/etc/apache2/original/httpd.conf和/ etc/apache2/extra/httpd-ssl引用的.conf。
的httpd -V显示正确的conf在使用
Server version: Apache/2.4.16 (Unix)
Server built: Aug 22 2015 16:51:57
Server's Module Magic Number: 20120211:47
Server loaded: APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr"
-D SUEXEC_BIN="/usr/bin/suexec"
-D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
的httpd -S显示的网站加载正确
VirtualHost configuration:
*:80 is a NameVirtualHost
default server localhost (/private/etc/apache2/extra/httpd-vhosts.conf:24)
port 80 namevhost localhost (/private/etc/apache2/extra/httpd-vhosts.conf:24)
port 80 namevhost phpmyadmin (/private/etc/apache2/extra/httpd-vhosts.conf:29)
port 80 namevhost site1.local (/private/etc/apache2/extra/httpd-vhosts.conf:34)
port 80 namevhost ideas.local (/private/etc/apache2/extra/httpd-vhosts.conf:39)
port 80 namevhost site2.local (/private/etc/apache2/extra/httpd-vhosts.conf:44)
port 80 namevhost site3.local (/private/etc/apache2/extra/httpd-vhosts.conf:49)
port 80 namevhost site4 (/private/etc/apache2/extra/httpd-vhosts.conf:54)
port 80 namevhost site5 (/private/etc/apache2/extra/httpd-vhosts.conf:59)
port 80 namevhost site6 (/private/etc/apache2/extra/httpd-vhosts.conf:64)
port 80 namevhost site7 (/private/etc/apache2/extra/httpd-vhosts.conf:69)
port 80 namevhost site8 (/private/etc/apache2/extra/httpd-vhosts.conf:74)
port 80 namevhost test (/private/etc/apache2/extra/httpd-vhosts.conf:79)
ServerRoot: "/usr"
Main DocumentRoot: "/www"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex default: dir="/private/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex proxy: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="_www" id=70 not_used
Group: name="_www" id=70 not_used
的*。本地网站加载正确的,虽然他们的DocumentRoots像:
/www/site1/public
我一直在看它这么久,我我错过了一些非常明显的不是我。请把我从痛苦中解救出来。
谢谢。
我面对类似的东西以及。我的主机根本不工作。 –
stackoverflow.com/questions/42398591/apache-virtual-hosts-suddenly-broken-mac-os-x-el-capitan –