我的服務器上有「Apache 2.4.6(Ubuntu)」和「PHP 5.5.4-1(cli)」,我建立了一個工作正常的子域,運行PHP腳本,但沒有任何圖像顯示出來。我已經將圖像的URL輸入到網絡瀏覽器中,並且只是在那裏加載了很長時間。Apache沒有提供子域映像
我一直在玩我的網站可用的配置文件,但似乎無法讓他們顯示。我沒有.htaccess文件阻止圖像或類似的東西。
這是我subdomain.domain.com.conf文件(編輯不給出任何細節):
# domain: subdomain.domain.com
# public: /home/username/public/domain.com/subdomain/public
<VirtualHost subdomain.domain.com:80>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/home/username/public/domain.com/subdomain/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin [email protected]
ServerName www.subdomain.domain.com
ServerAlias subdomain.domain.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/username/public/domain.com/subdomain/public
# Log file locations
LogLevel warn
ErrorLog /home/username/public/domain.com/log/error.log
CustomLog /home/username/public/domain.com/log/access.log combined
</VirtualHost>
當我嘗試查看: subdomain.domain.com/elements/img/test png格式
瀏覽器只是坐在自己載入中...
我是不是在尋找解決這個問題的正確的地方?我應該檢查其他配置文件嗎?不知怎的,我的domain.com.conf文件是否與子域混淆?
謝謝,我感謝你的幫助!
什麼是apache的訪問日誌和錯誤日誌? – JorgeeFG
訪問日誌有1行 119.63.196.28 - [02/Oct/2013:06:12:56 +0000]「GET /images/mini.png HTTP/1.1」404 473「 - 」「Baiduspider-image +(+ http://www.baidu.com/search/spider.htm)「 這是不是我想要訪問的圖像和錯誤日誌有: [Thu Oct 03 13:02:44.627024 2013] [mpm_prefork :通知] [pid 24839] AH00169:發現SIGTERM,關閉 [Thu Oct 03 13:02:45.838208 2013] [mpm_prefork:notice] [pid 24955] AH00163:Apache/2.4.6(Ubuntu)PHP/5.5.4 -1 + debphp.org〜精確+ 1配置 - 恢復正常操作 這是我在做Apache重啓我相信... –
好吧,我剛剛輸入了一個圖像的URL在主域圖像文件夾中,顯示出來了,我把這個子域前綴加到了URL的思想中在那裏會給我一個404,但它爲我提供了坐在我的主域名上的圖像?!這是怎麼發生的? –