0
每當我加載以下網站http://example.tk或ml或ga或gq, 什麼也沒有加載,它下載一個相對於url的文件,http://example.tk/domain會下載一個名爲「domain」的文件。它可能與DNS有關,但我已將DNS添加到方程中,因爲當我使用直接主機到IP時它工作正常。Apache PHP下載頁面加載文件
我只是要求作爲最後的手段。嘗試了很多東西,這是唯一不起作用的東西。
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
AccessFileName .htaccess
UseCanonicalName Off
Alias /error_pages_domain /var/www/errors
Alias /error_pages_domain/js /var/www/errors/js
Alias /error_pages_domain/css /var/www/errors/css
ErrorDocument 400 /error_pages_domain/error.php?type=400
ErrorDocument 401 /error_pages_domain/error.php?type=401
ErrorDocument 402 /error_pages_domain/error.php?type=402
ErrorDocument 403 /error_pages_domain/error.php?type=403
ErrorDocument 404 /error_pages_domain/error.php?type=404
ErrorDocument 405 /error_pages_domain/error.php?type=405
ErrorDocument 406 /error_pages_domain/error.php?type=406
ErrorDocument 407 /error_pages_domain/error.php?type=407
ErrorDocument 408 /error_pages_domain/error.php?type=408
ErrorDocument 409 /error_pages_domain/error.php?type=409
ErrorDocument 410 /error_pages_domain/error.php?type=410
ErrorDocument 411 /error_pages_domain/error.php?type=411
ErrorDocument 412 /error_pages_domain/error.php?type=412
ErrorDocument 413 /error_pages_domain/error.php?type=413
ErrorDocument 414 /error_pages_domain/error.php?type=414
ErrorDocument 415 /error_pages_domain/error.php?type=415
ErrorDocument 500 /error_pages_domain/error.php?type=500
ErrorDocument 501 /error_pages_domain/error.php?type=501
ErrorDocument 502 /error_pages_domain/error.php?type=502
ErrorDocument 503 /error_pages_domain/error.php?type=503
ErrorDocument 504 /error_pages_domain/error.php?type=504
ErrorDocument 505 /error_pages_domain/error.php?type=505
<Directory "/var/www/domains">
AllowOverride All
</Directory>
<Directory /var/www/errors>
DirectoryIndex index.php index.html index.htm index.shtml
Options Indexes FollowSymLinks Multiviews Includes
AllowOverride All
Allow from all
</Directory>
Servername example.tk
ServerAlias www.example.* example.*
ServerAlias *.examdns.tk
ServerAlias examdns.tk
Documentroot /var/www/domains/example.tk/public_html
</VirtualHost>
DNS記錄:
Type: A name: example.com Domain_ID:0 Content: {ipofhost1} ttl: 120
Type: A name: example.com Domain_ID:0 Content: {ipofhost2} ttl: 120
Type: A name: example.com Domain_ID:0 Content: {ipofhost3} ttl: 120
Type: CNAME name: example.com Domain_ID:0 Content: {hostnameofhost4} ttl: 120
Type: SOA name: example.com Domain_ID:0 Content: ns01.examdns.tk ns02.examdns.tk ttl: 86400
那麼請求響應在瀏覽器調試控制檯中顯示哪些標頭? – arkascha 2015-04-02 11:48:31