我一直在試圖建立的CakePHP在Amazon實例(Ubuntu的).. 但是對應用程序發出的所有請求將返回404 ..CakePHP的總是在Amazon EC2上返回404
它是什麼,做錯了什麼??
問候 阿布舍克耆那教
我一直在試圖建立的CakePHP在Amazon實例(Ubuntu的).. 但是對應用程序發出的所有請求將返回404 ..CakePHP的總是在Amazon EC2上返回404
它是什麼,做錯了什麼??
問候 阿布舍克耆那教
請嘗試以下步驟
mod_rewrite
與<?php phpinfo();
AllowOverride=All
。檢查httpd.conf
。檢查了前2個步驟,他們似乎是正確的..但我不知道是什麼,我需要檢查第三點..我的應用程序在webroot文件夾下的子文件夾.. as ../var/www/cakeapp .. – 2011-01-10 07:35:46
我已經配置Ubuntu服務器14.04 LTS在Amazon EC2(HVM),SSD卷類型和整理我配置CakePHP的設置和獲取404錯誤後配置Apache Mysql的& PHP5在同一當我試圖訪問任何頁面,然後我得到了,我打算與大家分享相同的解決方案..
希望它會爲你工作..
啓用mod_rewrite的在Ubuntu
讓利確保你已經啓用了mod_rewrite。在您的終端提示符下,輸入以下內容:
$ sudo a2enmod rewrite
簡單。它有用嗎?如果太棒了!如果沒有,請嘗試以下幾個步驟。同樣是在終端,打開了以下文件:
$ sudo gedit /etc/apache2/sites-available/default
OR
$ sudo gedit /etc/apache2/sites-available/000-default.conf
現在改變的AllowOverride值設置爲「所有」與人相處。我已經包含了該文件現在應該用於默認安裝的內容。
重啓Apache就大功告成了:
$ sudo service apache2 restart
下面是與後面提到的變化的樣本文件。
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/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>
</VirtualHost>
希望這會爲你工作...
你得到蛋糕的404頁或Web服務器的或亞馬遜?您是否嘗試在本地環境中運行Cake應用程序? – sibidiba 2011-01-07 12:15:23