我的服务器设置为仅 SSL,唯一可用的站点是:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ErrorDocument 400 /index.html
ErrorDocument 401 /index.html
ErrorDocument 402 /index.html
ErrorDocument 403 /index.html
ErrorDocument 404 /index.html
ErrorDocument 405 /index.html
ErrorDocument 406 /index.html
ErrorDocument 407 /index.html
ErrorDocument 408 /index.html
ErrorDocument 409 /index.html
ErrorDocument 410 /index.html
ErrorDocument 411 /index.html
ErrorDocument 412 /index.html
ErrorDocument 413 /index.html
ErrorDocument 414 /index.html
ErrorDocument 415 /index.html
ErrorDocument 416 /index.html
ErrorDocument 417 /index.html
ErrorDocument 500 /index.html
ErrorDocument 501 /index.html
ErrorDocument 502 /index.html
ErrorDocument 503 /index.html
ErrorDocument 504 /index.html
ErrorDocument 505 /index.html
<IfModule security2_module>
SecRuleEngine Off
</IfModule>
ServerAdmin [email protected]
ServerName update.my-site.com
ServerAlias www.update.my-site.com
DocumentRoot /var/www/update.my-site.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/update.my-site.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/2_my-site.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/my-site.key
SSLCertificateChainFile /etc/apache2/ssl/1_root_bundle.crt
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
尽管 DNS 指向正确的 IP,但我根本无法通过网络连接到服务器,但如果我在浏览器中输入服务器的 IP 地址,浏览器就会运行,https://site-ip
但仍然显示 404。
/var/log/apache2/access.log不记录任何人的访问,但/var/log/apache2/other_vhosts_access.log确实记录了我的访问:
server3.my-site.com:80 70.168.134.25 - - [27/Nov/2016:10:33:11 -0500] "POST /office/papi/file.php HTTP/1.1" 302 573 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDC; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)"
但是显示的ip不是我自己的。
任何日志中均无错误。
关于在哪里调试有什么指示吗?
答案1
尝试这个:
<VirtualHost server_ip:443>
代替
<VirtualHost _default_:443>