我的 vhost.conf
NameVirtualHost 111.111.111.111:80
<VirtualHost 111.111.111.111:80>
DocumentRoot /var/www/vhosts/blog.xxx.jp/wordpress
ServerName blog.xxx.jp
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/javascript text/css application/json
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{cookie}i\" \"%{Set-cookie}o\"" cookie
CustomLog "|/usr/sbin/cronolog -S /var/www/vhosts/blog.xxx.jp/statistics/logs/access_log-last /var/www/vhosts/blog.xxx.jp/statistics/logs/access_log-%Y-%U" cookie
ErrorLog "|/usr/sbin/cronolog -S /var/www/vhosts/blog.xxx.jp/statistics/logs/error_log-last /var/www/vhosts/blog.xxx.jp/statistics/logs/error_log-%Y-%U"
<Directory /var/www/vhosts/blog.xxx.jp/wordpress>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 111.111.111.111:80>
DocumentRoot /var/www/vhosts/shop.xxx.jp/eccube-2.12.2/html
ServerName shop.xxx.jp
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/javascript text/css application/json
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{cookie}i\" \"%{Set-cookie}o\"" cookie
CustomLog "|/usr/sbin/cronolog -S /var/www/vhosts/shop.xxx.jp/statistics/logs/access_log-last /var/www/vhosts/shop.xxx.jp/statistics/logs/access_log-%Y-%U" cookie
ErrorLog "|/usr/sbin/cronolog -S /var/www/vhosts/shop.xxx.jp/statistics/logs/error_log-last /var/www/vhosts/shop.xxx.jp/statistics/logs/error_log-%Y-%U"
<Directory /var/www/vhosts/shop.xxx.jp/eccube-2.12.2/html>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
服务器版本:Apache/2.2.15 (Unix) 服务器搭建:2013 年 2 月 22 日 11:19:58
我可以访问 shop.xxx.jp,但不能访问 blog.xxx.jp(它不是 ping)。任何帮助将不胜感激。
我试图删除第二部分 & 我的 vhost.conf 开始看起来像这样 ⬇</p>
NameVirtualHost 111.111.111.111:80
<VirtualHost 111.111.111.111:80>
DocumentRoot /var/www/vhosts/blog.xxx.jp/wordpress
ServerName blog.xxx.jp
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/javascript text/css application/json
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{cookie}i\" \"%{Set-cookie}o\"" cookie
CustomLog "|/usr/sbin/cronolog -S /var/www/vhosts/blog.xxx.jp/statistics/logs/access_log-last /var/www/vhosts/blog.xxx.jp/statistics/logs/access_log-%Y-%U" cookie
ErrorLog "|/usr/sbin/cronolog -S /var/www/vhosts/blog.xxx.jp/statistics/logs/error_log-last /var/www/vhosts/blog.xxx.jp/statistics/logs/error_log-%Y-%U"
<Directory /var/www/vhosts/blog.xxx.jp/wordpress>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
& 带有 Wordpress 的网站开始在这个 url 上工作 -> shop.xxx.jp 也许,这将是一个提示或其他东西 :)
更新我运行-> dig blog.xxx.jp
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6_3.6 <<>> blog.salaf.jp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 19121
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;blog.xxx.jp. IN A
;; AUTHORITY SECTION:
xxx.jp. 10674 IN SOA ns36.joeswebhosting.net. support- tech.joeswebhosting.net. 2013032104 86400 7200 3600000 86400
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Apr 9 10:45:56 2013
;; MSG SIZE rcvd: 103