Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cakephp & httpd.conf issues on windows based apache server (wamp)

Tags:

So, i was wondering if some one could clarify following occurrence and maybe suggest how I could tackle this.

sorry for the weird coloring of the code

Let me explain the set up first. I have wamp server installed and it is located physically on one hd and then my development files are located on separate hd. So i have added alias to access specific dev folder

in httpd.conf i have following

ServerRoot D:/Program Files/wamp/bin/apache/apache2.2.11  
Listen 80  
ServerName localhost:80  
DocumentRoot D:/Program Files/wamp/www  
<Directory />  
    Options FollowSymLinks  
    AllowOverride None  
    Order deny,allow  
    Deny from all  
</Directory>  
<Directory D:/Program Files/wamp/www/>  
    Options Indexes FollowSymLinks  
    AllowOverride all  
    Order Allow,Deny  
    Allow from all  
</Directory>  

following is in seperate conf file and included into httpd.conf

Alias /project_birthday_planner "E:/Development/--- Projects-Full/PROJECT - BirthdayPlanner/trunk/"  
<Directory E:/Development/--- Projects-Full/PROJECT - BirthdayPlanner/trunk/>  
    Options Indexes FollowSymlinks MultiViews  
    AllowOverride All  
    Order allow,deny  
    Allow from all  
</Directory>  

in my E:/Development/--- Projects-Full/PROJECT - BirthdayPlanner/trunk/ i have my cakephp directories and files

here is the problem

my mode rewrite is turned on and my htaccess files for following cakephp folders are as following,

root of the cakephp

<IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteBase /  
    RewriteRule ^$ /app/webroot/ [L]  
    RewriteRule (.*) /app/webroot/$1 [L]  
</IfModule>  

*\app*

<IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteBase /  
    RewriteRule ^$ /webroot/ [L]  
    RewriteRule (.*) /webroot/$1 [L]  
</IfModule>  

*\app\webroot*

<IfModule mod_rewrite.c>  
    RewriteEngine On  
    RewriteBase /  
    RewriteCond %{REQUEST_FILENAME} !-d  
    RewriteCond %{REQUEST_FILENAME} !-f  
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]  
</IfModule>  

when I access /project_birthday_planner i get following error 404 Not Found

**Not Found**  
The requested URL /app/webroot/ was not found on this server.  

if i set DocumentRoot to my cakephp folder or move cakephp folders and files to initial DocucumentRoot folder, all fires up and works.

question is how do i tackle this issue, is this something that inherently comes with the use of apache Alias or am I missing some piece

should this set up be tackled via VirtualHost then?

thank you so much in advance

like image 873
GnrlBzik Avatar asked Feb 24 '10 23:02

GnrlBzik


People also ask

What is CakePHP?

CakePHP is a free, open-source, rapid development framework for PHP. It's a foundational structure for programmers to create web applications. Our primary goal is to enable you to work in a structured and rapid manner–without loss of flexibility. CakePHP takes the monotony out of web development.

Is CakePHP a MVC?

CakePHP follows the MVC software design pattern. Programming using MVC separates your application into three main parts: The Model represents the application data. The View renders a presentation of model data.

What is CakePHP developer?

A CakePHP Developers are usually responsible for writing server-side web application logic using the CakePHP framework. They mainly develop back-end components and connect the application with the other web services. In addition, they support the front-end developers by integrating their work with the application.

What is CakePHP model?

Usually, model classes represent data and are used in CakePHP applications for data access. They generally represent a database table but can be used to access anything that manipulates data such as files, external web services, or iCal events. A model can be associated with other models.


1 Answers

You have to point the Rewritebase to the right path ... see here

like image 174
Dark Avatar answered Nov 15 '22 09:11

Dark