cakephp css/js not load - apache

I am using cakephp 2.6.2 in ubuntu 16.04 . I enabled mod_rewrite in my system. I downgrade php 7 to php 5.6 .In my cakephp program css and js are not loading
<script src="/admin/plugins/jQuery/jQuery-2.1.4.min.js"></script>
it not take the project name along with the src
The project need index.php in the url
Sessions are not working.
I dont know any other configuration is needed in apache
$this->redirect('/notifications/index/');
returns localhost/notifications/index/ instead of localhost/projectfolder/notifications/index/
I got Solution
My .htaccess is not load by apache. I mention "AllowOverride All" in my virtual host configuration. now it is working fine

Related

laravel 5 ,requested url was not found on this server?

I am trying to upload my laravel 5 project on Apache/2.4.7 (Ubuntu) Server at xxx.xx.x.xx Port 80.
When i browse my site using xxx.xx.x.xx/project/public , landing page is working fine.
But when i tried to log in , it throws this error ,
The requested URL xxx.xx.x.xx/project/public/auth/login was not found on this server.
but when i tried this xxx.xx.x.xx/project/public/index.php/auth/login it throws View [app] not found.
I tried using RewriteBase on htaccess file also edited public/index.php file and changed these following lines...
require __DIR__.'/../bootstrap/autoload.php';
to require __DIR__.'/../project/public/bootstrap/autoload.php';
and
$app = require_once __DIR__.'/../bootstrap/app.php';
to $app = require_once __DIR__.'/../project/public/bootstrap/app.php';
nothing is working!!
I know this one is older topic but i didn't find solution.
Looking for your suggestions.
Which version of Laravel are you working on? I've got problem with auth on 5.1 LTS. No problem with standard configuration (never touched htaccess or config file).
I can suggest to try a new install with a new Laravel package on your server without modifications and see if it works.
This may help: Laravel 5.1 Authentication documentation
Try to enable Apache rewrite module. Run this in command line:
a2enmod rewrite
and don't forget to restart Apache after.
service apache2 restart

Local Apache server doesn't run php file, instead the web browser downloads

My local Apache server doesn't run my php file, instead the web browser downloads it when I try to view it. I'm using LAMP on Ubuntu. Would you help me how I can solve this problem? Thank!
Did you tell LAMP to handle .php files with the php5_module?
Check your current php setting by creating a new php file in the htdocs or www direectory with the following content:
<?php phpinfo(); ?>
This will show you if your webserver can process php files or not

Apache mod_speling PHP framework

I have Apache’s mod_speling module enabled and can’t get lowercase URLs to work properly. This is running on Ubuntu.
Example: localhost/controller
The file name is Controller.php.
It works when I type in localhost/Controller.
Is there any way to set up Apache to use the lowercase version?
My configuration for mod_speling:
CheckSpelling On

Set up RefineryCMS with Passenger

I'm trying to get a RefineryCMS install running on my CentOS VPS (which has DirectAdmin installed, which I don't think makes any difference for my problem) but somehow I cannot get it to host.
In my httpd.conf I've added the following:
RailsEnv development
PassengerHighPerformance on
|?DOCROOT=/home/user/domains/domain.name/public_html/rails/refinery_test_install/|
The paths are all correct and my normal Rails 3 applications work perfectly when I put these lines in my httpd.conf yet now it will just load the index.html file I've put in the directory pure for testing.
Any ideas on how I could get this up and running?
I was totally missing I didn't forwarded passenger to Rails' public folder. The configuration works with the following docroot:
|?DOCROOT=/home/user/domains/domain.name/public_html/rails/refinery_test_install/public/|

rails3 : appending /app1 to apache virtual host url

I just installed a Rails 3 application on a development server, and it can be loaded by using http://server:3000/
In our production setup, all applications are proxied by apache running on another server. All applications are to be accessed by http://prodserver/appX . CSS and javascripts need to be loaded when using apache proxy.
How do I revise routes.rb and change rails.root to use appX, without changing the application?
Use the ProxyPassReverse configuration command in Apache and it will rewrite URL's so you don't have to change anything in routes.rb