2012-11-22 257 views
2

我試圖讓我的網站設置,每當我試圖用我的域名連接我得到「404未找到」404與Apache服務器未找到

當我試圖達成我的IP站點它工作正常。

我在Debian x64上。

有人可以幫助我解決這個問題。

如果您需要更多信息,請查詢。

Httpd.conf

Apache2.conf

+0

@Arnestig:你不知道的問題實際上是Debian的特定與否。 –

+0

@StefanSteinegger:我們不知道這個問題是由硬件問題,軟件問題還是其他問題引起的。 Nicholas Brown告訴我們他正在使用Debian x64,這很好,但問題本身與Debian無關。他並沒有問一個關於Debian如何工作/行爲的問題。這個問題完全是爲了讓Apache運行起來。因此標籤「apache」。 – Arnestig

+0

@Arnestig:好點。 –

回答

1

虛擬主機應該是這樣的:

<VirtualHost *:80> 
     ServerAdmin [email protected] 
     DocumentRoot /home/web/websites/special-faces.net 
     ServerName special-faces.net 
     ServerAlias www.special-faces.net 
     ErrorLog /home/web/website_logs/errorlog.txt 
     CustomLog /home/web/website_logs/accesslog.txt common 

     <Directory "/home/web/websites/special-faces.net"> 
      Order allow,deny 
      Allow from all 
     </Directory> 

    </VirtualHost> 

如果你想使用.htaccess文件,該行 「從所有允許」 後補充一點:

Allowoverride all 
+0

現在就開始工作吧。 –

+0

@Nicholas Brown你看過DNS設置嗎? – Kenzo

2

你在哪裏有你的網站?在本地網絡上還是在託管服務提供商?

在你需要你的Web服務器IP地址添加到DNS服務器根據你的需求(無論是本地或www),不知道在您的Web服務器是本地或全局,很難給你一個答案

任何情況下,
+0

好點。我甚至沒有考慮DNS設置,但也應該考慮這一點。 – Kenzo

+0

我的網站在提供者VPS上。 –

+0

@Nicholas Brown這並不一定意味着DNS設置是正確的。 – Kenzo

0

對於服務器版本:阿帕奇/ 2.4.16及更高版本,

<VirtualHost localhost.com:80> 
     ServerName localhost.com 
     ServerAlias localhost.com 
     ServerAdmin [email protected] 
     RewriteEngine On 

     DocumentRoot /var/www/html 
     DocumentRoot /home/<user name where code will be placed>/public_html/html 
     <Directory /var/www/html> 
       AllowOverride All 
       Order allow,deny 
       allow from all 
     </Directory> 

     ErrorLog ${APACHE_LOG_DIR}/error.log 

     # Possible values include: debug, info, notice, warn, error, crit, 
     # alert, emerg. 
     LogLevel warn 

     CustomLog ${APACHE_LOG_DIR}/access.log combinedtimezone 

</VirtualHost> 
相關問題